Mark the end of a transaction.
Syntax
COMMIT [ { TRAN | TRANSACTION }
[ transaction_name | @tran_name_variable ] ]
[ WITH ( DELAYED_DURABILITY = { OFF | ON } ) ]
[ ; ]
Syntax for Synapse Data Warehouse in Microsoft Fabric, Azure Synapse Analytics, and Parallel Data Warehouse Database.
syntaxsql
COMMIT [ TRAN | TRANSACTION ]
[ ; ]
A commit will make any data modifications performed since the start of the transaction a permanent part of the database.
transaction_name Ignored by the SQL Server Database Engine. transaction_name is used by programmers to associate a BEGIN TRANSACTION statement with a COMMIT TRANSACTION statement. transaction_name must conform to the rules for identifiers, but can't exceed 32 characters.
@tran_name_variable The name of a user-defined variable containing a valid transaction name. The variable must be declared with a char, varchar, nchar, or nvarchar data type. If more than 32 characters are passed to the variable, only 32 characters are used. The remaining characters are truncated.
WITH DELAYED_DURABILITY = { OFF | ON }
Option that requests this transaction should be committed with delayed durability. The request is ignored if the database was altered with DELAYED_DURABILITY = DISABLED or DELAYED_DURABILITY = FORCED.
You can't roll back a transaction after a COMMIT TRANSACTION statement is issued, because the data modifications were made a permanent part of the database.
The syntax COMMIT or COMMIT WORK is compatible with SQL-92.
COMMIT
“Once a journalist makes a commitment of confidentiality to a source, only the source can end that commitment” ~ Matt Cooper