Ends the current transaction and undoes any database changes performed during the transaction.
Syntax
ROLLBACK [ WORK ] ;
Rules to use the ROLLBACK statement
The following rules should be followed while using the ROLLBACK statement:
It can be used in an embedded SQL application.
It can be used in tools like SQL Explorer which expose the COMMIT operation as a SQL statement.
It cannot be used in an ODBC or JDBC application because ODBC exposes the COMMIT operation as the ODBC API SQLEndTran() and JDBC exposes the COMMIT operation in the connection object as the commit() method.
It cannot be used in an OE SQL stored procedure because a stored procedure runs on the OpenEdge SQL server while transactions can be controlled only from a SQLclient.
Notes
Under certain circumstances, SQL marks a transaction for abort but does not actually roll it back immediately. Without an explicit ROLLBACK, any subsequent updates do not take effect. A COMMIT statement causes SQL to recognize the transaction as marked for abort and instead implicitly rolls back the transaction.
SQL marks a transaction for abort in the event of a hardware or software system failure. This transaction is rolled back during recovery.