CREATE PROCEDURE ProcName @Id INT, @user_id INT AS BEGIN BEGIN TRANSACTION [transName] BEGIN TRY DELETE FROM table1 WHERE UserId= @user_id UPDATE table2 SET DATE_MODIFIED = GETDATE() WHERE ID= @Id COMMIT TRANSACTION [transName] END TRY BEGIN CATCH ROLLBACK TRANSACTION [transName] THROW END CATCH END
THROW
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)