You will make a mistake on purpose, inside a transaction, and then undo it.
- Start a transaction. Then set every balance to 0 with one UPDATE that has no WHERE.
- How many rows does
account_loghave now? - Undo the change. Every balance must be back and the transaction must be over.
- Think before you run it: you run
BEGIN;, add 25 to Sofia's balance, runCOMMIT;and thenROLLBACK;. What is Sofia's balance at the end?