SQL - Transactions and Data Integrity
Consider this SQL transaction:
What happens if the second UPDATE fails?
BEGIN TRANSACTION; UPDATE accounts SET balance = balance - 100 WHERE id = 1; UPDATE accounts SET balance = balance + 100 WHERE id = 2; COMMIT;
What happens if the second UPDATE fails?
