且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Server 存储过程中的错误处理

更新时间:2023-02-07 11:29:32

In order to be able to do a rollback, you need to do a begin transaction at the start.

Then you either commit or rollback the actions.

http://msdn.microsoft.com/en-us/library/ms174377

You may find the try/catch syntax easier

http://msdn.microsoft.com/en-us/library/ms175976(v=sql.90).aspx