rollback transaction

Description

Rolls back a user-specified transaction to the last savepoint inside the transaction or to the beginning of the transaction.

Syntax

Transact-SQL Syntax

rollback {tran[saction] | work}
 [transaction_name | savepoint_name]

ODBC Syntax

ODBC does not support rollback as a SQL command. ECDA Option for ODBC traps the command and monitors the transaction state with the child process. If a transaction is opened, a call to SQL Transact() is generated.

Parameters

transaction_name

is the name assigned to the transaction. It must conform to the rules for identifiers.

Examples

Example 1

rollback transaction

Usage