Pages

Friday, 15 April 2011

Example of rollback transactions in sql

begin transaction
insert into table1 (...,...) values (...,...)
if @@error <> 0
rollback trans
else
insert into table2 (...,...) values (...,...)
if @@error <> 0
rollback trans
else
insert into table3 (...,...) values (...,...)

No comments:

Post a Comment