thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

ROLLBACK Statement

The TCL command that undoes all uncommitted changes in the current transaction, or back to a savepoint.

Definition

ROLLBACK restores data to its state at the start of the transaction, using the undo or transaction log, and releases locks. Databases also roll back automatically on failure, which enforces atomicity.

Example

ROLLBACK; -- discards the uncommitted UPDATE

Exam tip

ROLLBACK only affects uncommitted work, and DDL that auto-commits (as in Oracle) cannot be rolled back.

Related terms