How would you handle error in SQL SERVER 2008?

Posted by

To view Verified answers click on the button below.

SQL Server now supports the use of TRY…CATCH con handling. TRY…CATCH lets us
build error handling at the level we need, in the way w to, by setting a region where
if any error occurs, it will break out of the region and head to an error handler.
The basic structure is as follows:

BEGIN TRY
stmts..
END TRY
BEGIN CATCH
stmts..
END CATCH