CREATE PROCEDURE DelRowsByID @id intASBEGIN begin transaction begin try --sql end try begin catch if @@trancount>0 rollback transaction end catch if @@trancount>0 commit transaction END