⌘BABAKOV.NET Let's code!
100% [dark] [ru]
~/posts $

Posts

Let's code!

202 total · page 21 / 21

Example of Error Catching in MSSQL

Example of how to catch errors in MSSQL. BEGIN TRY -- Some code that will return an error for example. SELECT 1/0; END TRY BEGIN CATCH SELECT ERROR_NUMBER() AS ErrorNumber ,ERROR_SEVERITY() AS ErrorSeverity ,ERROR_STATE() AS ErrorState ,ERROR_PROCEDURE() AS ErrorProcedure ,ERROR_LINE() AS ErrorLine ,ERROR_MESSAGE() AS ErrorMessage; END CATCH

17 views 0 comments 0 likes ./Read →