Bird
0
0

A developer sets the isolation level using: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; but still observes phantom reads. What is the most likely cause?

medium📝 Debug Q6 of 15
SQL - Transactions and Data Integrity
A developer sets the isolation level using: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; but still observes phantom reads. What is the most likely cause?
AThe command was run outside a transaction
BThe database does not support SERIALIZABLE level
CThe isolation level was set after the transaction started
DPhantom reads are allowed in SERIALIZABLE level
Step-by-Step Solution
Solution:
  1. Step 1: Understand when isolation level applies

    Isolation level must be set before transaction begins to take effect.
  2. Step 2: Analyze phantom reads despite SERIALIZABLE

    If set after start, previous level remains, allowing phantoms.
  3. Final Answer:

    The isolation level was set after the transaction started -> Option C
  4. Quick Check:

    Set isolation before transaction starts [OK]
Quick Trick: Set isolation level before starting transaction [OK]
Common Mistakes:
  • Assuming phantom reads allowed in SERIALIZABLE
  • Ignoring transaction boundaries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes