Inside a transaction you run two UPDATE statements and then realise they were wrong. Which command undoes all changes made since the transaction began?
Correct answer D. ROLLBACK
Explanation
ROLLBACK aborts the current transaction and discards every change made since it began, restoring the state before BEGIN. COMMIT does the opposite: it makes the changes permanent and visible to other sessions. SAVEPOINT only marks a point inside the transaction that you can later roll back to partially. COMMIT, ROLLBACK and SAVEPOINT together form the Transaction Control Language (TCL).
Answer checked How we write and check questions
Discussion