easy5 pts · first answer countstransactions
What ROLLBACK undoes
The accounts table starts with balance 500 for id 1. What does the final SELECT return?
BEGIN; UPDATE accounts SET balance = balance - 100 WHERE id = 1; UPDATE accounts SET balance = balance - 50 WHERE id = 1; ROLLBACK; SELECT balance FROM accounts WHERE id = 1;
Discussion 0
Join free to post in the discussion.
Related questions
- Durability in ACIDDatabase Administrator
- Why a write-ahead log existsDatabase Administrator
- Non-repeatable readDatabase Administrator
- Fixing a recurring deadlockDatabase Administrator
- Two doctors go off callDatabase Administrator
- Locks held by nobodyDatabase Administrator
- Faster commits with a durability costDatabase Administrator
- Atomicity in a money transferBackend Developer