Pages

Men

rh

12/29/2012

Handling Errors in SQL SERVER 2008?


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 
  Statements
END TRY
BEGIN CATCH
   Statements
END CATCH

No comments :

Post a Comment