B. SQL Statements from Earlier Releases : Abort Statement
 
Share this page                  
Abort Statement
The Abort statement, when used without the optional to savepoint_name clause, allows the user to terminate an in-progress multi-statement transaction (MST) at any time before the transaction is committed with an explicit end transaction statement. The abort statement causes all database changes effected by the MST to be undone and terminates the MST.
You also have the option of aborting part of a transaction to a pre-declared savepoint. The abort statement with the optional to savepoint_name clause undoes the database effects of all statements in the MST that follow the declaration of the named savepoint. Following an abort to savepoint_name, the MST remains in progress, and new statements can be added to the MST in the normal fashion. Repeated aborts can be executed to the same savepoint.
This statement has the following format:
ABORT [TO savepoint_name]
Note:  When executing an abort to a given savepoint, all savepoints declared after the named savepoint are nullified.
Begin Transaction (see Begin Transaction Statement)
End Transaction (see End Transaction Statement)