SAVEPOINT creates a point within a transaction to which we can roll back without necessarily cancelling the entire transaction.
BEGIN;
UPDATE Accounts
SET balance = balance - 1000
WHERE account_id = 1;
SAVEPOINT sp1;
UPDATE Accounts
SET balance = balance + 1000
WHERE account_id = 2;
ROLLBACK TO SAVEPOINT sp1;
COMMIT;