begin tran
begin try
update statement 1 ...
delete statement 2 ...
select 1;
end try
begin catch
if @@trancount > 0
rollback tran
select 0;
end catch
if @@trancount > 0
commit tran
go