sqlServer事务

代码
CREATE PROCEDURE DelRowsByID
@id int
AS
BEGIN
begin transaction
begin try
--sql
end try
begin catch
if @@trancount>0
rollback transaction
end catch
if @@trancount>0
commit transaction

END

 

posted @ 2010-11-05 17:02  comeonfyz  阅读(305)  评论(0编辑  收藏  举报