在SQL Server 2000
可以使用Try-Catch吗?
No, it is not possible.
This was only from Sql Server 2005
Check TRY...CATCH (Transact-SQL) and check the Other Versions
No. Try Catch
block was introduced in SQL SERVER 2005
.
Following article shows how you can use @@ERROR
to check for errors.
Instead you can user @@Error
..
check this article about error handling
@@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
在2005年和更高版本中没有引入Try Catch,您必须使用@@ Error处理异常
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.