Skip to content
RED SAGSkills
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;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions