Try Catch in SQL Server 2000?

2019-04-09 12:57发布

Is it possible using Try-Catch in SQL Server 2000?

5条回答
啃猪蹄的小仙女
2楼-- · 2019-04-09 13:52

@@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

查看更多
闹够了就滚
3楼-- · 2019-04-09 13:54

No, it is not possible.

This was only from Sql Server 2005

Check TRY...CATCH (Transact-SQL) and check the Other Versions

查看更多
聊天终结者
4楼-- · 2019-04-09 13:55

No Try Catch Was introduced 2005 and later version ,,,you have to use @@Error for handling your exception

查看更多
贪生不怕死
5楼-- · 2019-04-09 13:57

Instead you can user @@Error..

check this article about error handling

查看更多
Bombasti
6楼-- · 2019-04-09 14:00

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

查看更多
登录 后发表回答