Is it possible to use try-catch in SQL Server 2000?
SQL Server 2000
No, It is Immpossible.
It was only from Sql Server 2005
Check TRY ... CATCH (Transact-SQL) and check other versions
No. The block Try Catchwas introduced at SQL SERVER 2005.
Try Catch
SQL SERVER 2005
The following article shows how you can use @@ERRORto check for errors.
@@ERROR
Understanding Error Handling in SQL Server 2000
@@Error <. >
@@Error
@@ERRORis a variable updated by the SQL Server database engine after each statement on the server is executed. We can see by Print@@ERROR
No Try Catch. 2005 and later introduced, you need to use @@ Error to handle your exception