SET XACT_ABORT on

SET XACT_ABORT on
begin transaction test
select 1/0
go
select 1
commit transaction test
go


SET XACT_ABORT off
begin transaction test
select 1/0
select 1
commit transaction test

SET XACT_ABORT on
begin transaction test
select 1/0
go
select 1
commit transaction test
go


 

原文地址:https://www.cnblogs.com/qanholas/p/2688690.html