6> BEGIN TRY
7> SELECT 1/0 AS DivideByZero
8> SELECT 1 AS NoError
9> END TRY
10> BEGIN CATCH
11> SELECT 'Exception Caught!' AS CatchMessage
12> END CATCH
13> GO
DivideByZero
------------
(0 rows affected)
CatchMessage
-----------------
Exception Caught!
(1 rows affected)
1>
2>