|SQL - Structured Query Language|
COMMIT Transaction is marks the end of a successful implicit or explicit transaction. If @@TRANCOUNT is 1, COMMIT TRANSACTION makes all data modifications performed since the start of the transaction a permanent part of the database, frees the resources held by the transaction, and decrements @@TRANCOUNT to 0. If @@TRANCOUNT is greater than 1, COMMIT TRANSACTION decrements @@TRANCOUNT only by 1 and the transaction stays active.
Transaction_Name is ignored by the SQL Server Database Engine. Transaction_Name specifies a transaction name assigned by a previous BEGIN TRANSACTION.
@Tran_Name_Variable is the name of a user-defined variable containing a valid transaction name.
Naming a Transaction Example
The following example is used to update particular Employee Name.
Query Output Screen
* * * * *