begin Transaction
update ........
if(@@ERROR <> 0)
BEGIN
rollback Transaction
return -1
END
commit Transaction
return 0
begin Transaction
update ........
if(@@ERROR <> 0)
BEGIN
rollback Transaction
return -1
END
commit Transaction
return 0