Handling errors in T-SQL code Author: Basit A. Farooq Like other programming languages, Transact-SQL provides a sophisticated mechanism that captures and handles errors during execution. The mechanism for handling errors during execution includes the Transact-SQL tradition error handling function @@ERROR and object-oriented-programming-style TRY…CATCH construct. In this article, you’ll examine both techniques. Traditional error handling Earlier versions of SQL Server supported...