TRY & CATCH pattern
8. 12. 2017
TRY & CATCH should be used where reasonable to prevent unhandled exceptions in T-SQL code and routines. It’s prepared for copy/paste purposes for everyday use. We may have two basic types of pattern: The new one using THROW keyword The legacy one with RAISERROR() THROW version: BEGIN TRY BEGIN TRAN…