CREATE PROCEDURE TEST
AS
BEGIN
begin trandelete from tablea--第一句if @@error=0 goto error
insert into tablea select * from tableb--第二句
if @@error=0 goto errordelete from tableb--第三句if @@error=0 goto error
commit tran
goto saveend
:error
rollback tran
:saveendEND
GO
AS
BEGIN
begin trandelete from tablea--第一句if @@error=0 goto error
insert into tablea select * from tableb--第二句
if @@error=0 goto errordelete from tableb--第三句if @@error=0 goto error
commit tran
goto saveend
:error
rollback tran
:saveendEND
GO
有没有简单点的
我有好多存储过程没个里面都有不下10条更新的SQL语句这样改很累阿