SQL Flow Field Guide

Transactions (Transact-SQL)

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

none (documentation, rules or examples)

What changes

Input
none
Output or change
none

Syntax at a glance

n/a (reference page)

Work example

Several related changes need one clear commit or rollback boundary.

Mark the start, success, and failure paths. Check transaction count, lock duration, and XACT_STATE in the error path.

Check your work Transactions (Transact-SQL). Success commits once and failure leaves no partial change or open transaction.

Open Microsoft Learn for full syntax, permissions, and details for your version.