问题
Is it possible using Try-Catch in SQL Server 2000
?
回答1:
No, it is not possible.
This was only from Sql Server 2005
Check TRY...CATCH (Transact-SQL) and check the Other Versions
回答2:
No. Try Catch
block was introduced in SQL SERVER 2005
.
Following article shows how you can use @@ERROR
to check for errors.
Understanding error handling in SQL Server 2000
回答3:
Instead you can user @@Error
..
check this article about error handling
回答4:
@@ERROR
is a variable updated by the SQL Server database engine after each statement is executed on the server.
We can see by Print @@Error
回答5:
No Try Catch Was introduced 2005 and later version ,,,you have to use @@Error for handling your exception
来源:https://stackoverflow.com/questions/4524566/try-catch-in-sql-server-2000