ROLLBACK

Purpose

Use this statement to withdraw changes of the current transaction.

Prerequisite

None

Syntax

rollback::=

Rollback statement

Usage Notes

  • The keyword WORK is optional and is only supported to conform to the SQL standard.
  • For more information on transactions, see Transaction Management.

Example

CREATE TABLE t (i DECIMAL);
COMMIT;
INSERT INTO t values (1);
SELECT COUNT(*) FROM t;

ROLLBACK;
SELECT COUNT(*) FROM t;