Handling Sql Server Errors.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 181
BEGIN TRY 
SELECT [First] = 1
SELECT [Second] = 1/0
SELECT [Third] = 3
END TRY BEGIN CATCH
PRINT 'An error occurred'
END CATCH


First ----------- 1
(1 row(s) affected)
Second -----------
(0 row(s) affected)
An error occurred

Comments or Responses

Login to post response