SET XACT_ABORT on begin tran if @@Error<>0 rollback tran else commit tran 转载于:https://www.cnblogs.com/lecone/archive/2012/05/08/2490006.html