Bird
0
0

Identify the error in this SQL sequence with auto-commit OFF:

medium📝 Debug Q6 of 15
SQL - Transactions and Data Integrity
Identify the error in this SQL sequence with auto-commit OFF:
INSERT INTO orders (id, item) VALUES (1, 'Book');
COMMIT;
ROLLBACK;
AROLLBACK after COMMIT has no effect
BCOMMIT command is invalid here
CINSERT statement syntax error
DAuto-commit must be ON for COMMIT
Step-by-Step Solution
Solution:
  1. Step 1: Understand COMMIT effect

    COMMIT saves all changes made so far permanently.
  2. Step 2: Effect of ROLLBACK after COMMIT

    ROLLBACK after COMMIT cannot undo changes already saved.
  3. Final Answer:

    ROLLBACK after COMMIT has no effect -> Option A
  4. Quick Check:

    ROLLBACK only undoes uncommitted changes [OK]
Quick Trick: ROLLBACK after COMMIT does nothing [OK]
Common Mistakes:
  • Expecting ROLLBACK to undo committed changes
  • Thinking COMMIT is invalid with auto-commit OFF

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes