Four SQL error actions shown as rows of steps: statement termination skips only the failing step, scope abortion skips the rest of one procedure, batch termination skips everything after the error, and connection termination drops the session

SQL Error Actions: What SQL Server Does After an Error

SQL error actions decide what runs after an error in SQL Server. This post shows statement termination, scope abortion, batch termination, connection termination and XACT_ABORT, with real results from three small stored procedures. It also covers what each reaction does to an open transaction and how TRY…CATCH changes the outcome.

Read More