SQL - Transactions and Data Integrity
Consider the following SQL transaction sequence:
What will be the final balance for account with id = 1?
BEGIN TRANSACTION; INSERT INTO accounts VALUES (1, 100); SAVEPOINT sp1; UPDATE accounts SET balance = balance - 50 WHERE id = 1; ROLLBACK TO SAVEPOINT sp1; COMMIT;
What will be the final balance for account with id = 1?
