Bird
0
0

In a system with auto-commit OFF, you run:

hard📝 Application Q9 of 15
SQL - Transactions and Data Integrity
In a system with auto-commit OFF, you run:
UPDATE accounts SET balance = balance + 50 WHERE id = 2;
INSERT INTO logs (event) VALUES ('Deposit');

Then the connection drops before COMMIT. What happens to these changes?
AAll changes are lost due to no COMMIT
BChanges are saved automatically
COnly UPDATE is saved
DOnly INSERT is saved
Step-by-Step Solution
Solution:
  1. Step 1: Understand auto-commit OFF and connection drop

    Without COMMIT, changes remain uncommitted.
  2. Step 2: Effect of connection drop on uncommitted changes

    Connection drop causes rollback of uncommitted changes.
  3. Final Answer:

    All changes are lost due to no COMMIT -> Option A
  4. Quick Check:

    Uncommitted changes lost on connection drop [OK]
Quick Trick: Connection drop without COMMIT loses uncommitted changes [OK]
Common Mistakes:
  • Assuming partial changes are saved
  • Thinking auto-commit saves changes automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes