ROLLBACK

Undo a transaction, completely or to a savepoint.

Syntax
      ROLLBACK TRAN[SACTION  [option] [;]

      ROLLBACK [WORK] [;]

Options
       transaction
       @tranaction_variable
       savepoint 
       @savepoint_variable

Key
   Transaction     Name assigned to the transaction on BEGIN TRANSACTION. 
   @Transaction    User-defined variable containing a valid transaction name.
   savepoint       Savepoint name from a SAVE TRANSACTION statement.
   @savepoint_var  User-defined variable containing a valid savepoint name. 
   WORK            SQL 92 Compatibility

A transaction cannot be rolled back after COMMIT TRANSACTION is executed.

Example

ROLLBACK;

"All that glitters is not gold. All who wander are not lost" - William Shakespeare

Related commands:

COMMIT
Equivalent Oracle command: ROLLBACK


© Copyright SS64.com 1999-2014
Some rights reserved