1BEGIN;
2UPDATE accounts SET balance = balance - 100.00
3 WHERE name = 'Alice';
4SAVEPOINT my_savepoint;
5UPDATE accounts SET balance = balance + 100.00
6 WHERE name = 'Bob';
7-- oops ... forget that and use Wally's account
8ROLLBACK TO my_savepoint;
9UPDATE accounts SET balance = balance + 100.00
10 WHERE name = 'Wally';
11COMMIT;