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 (...,...)
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