4/26/2021 0 Comments Sql Server Error 1474 State 1
For example, we write a series of statements inside the TRY block.
Sql Server Error 1474 State 1 How To Use TheThe basic syntax of the ErrorState in SQL Server is as shown below: ERRORSTATE() SQL ERROR STATE example In this example, we are going to show you how to use the ErrorState function to find the error severity.SQL Server ERRORSTATE Example.GO OUTPUT ERROR STATE Example 2 It is another example to demonstrate the SQL Server ErrorState function. END CATCH OUTPUT ANALYSIS First, we declared two tinyint variables. Next we assigned 252 to Number variable, and then we added 10 to that variable which will become 262 (Result). SET Res Number 10; As we all know that tinyint holds numbers from 0 to 255 means Overflow so, it will exit from the TRY block, and execute the Sql Server error state statements inside our CATCH block. We used the ERRORMESSAGE function to display the error description PRINT NError State CAST(ERRORSTATE() AS VARCHAR(100)).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |