MSSQL - Try Catch Transaction (Canceling transaction with an error correctly)
Below is an example of correctly canceling a transaction with an error: update Params set Value=168 where Param = 'SessionHoursLimit' PRINT @@TRANCOUNT BEGIN TRY BEGIN TRAN PRINT @@TRANCOUNT update Params set Value=167 where Param = 'SessionHours…