Bird
0
0

If the isolation level is REPEATABLE READ, what will T1 see when it reads the same row again?

medium📝 query result Q13 of 15
SQL - Transactions and Data Integrity
Consider two transactions T1 and T2 running concurrently. T1 reads a row, then T2 updates and commits that row. If the isolation level is REPEATABLE READ, what will T1 see when it reads the same row again?
AThe updated value committed by T2
BThe original value before T2's update
CAn error due to concurrent update
DA partially updated value
Step-by-Step Solution
Solution:
  1. Step 1: Understand REPEATABLE READ and apply to scenario

    REPEATABLE READ ensures a transaction sees the same data on repeated reads of the same row. T1's second read sees the original value despite T2's committed update.
  2. Final Answer:

    The original value before T2's update -> Option B
  3. Quick Check:

    REPEATABLE READ prevents non-repeatable reads = The original value before T2's update [OK]
Quick Trick: REPEATABLE READ keeps data stable during transaction [OK]
Common Mistakes:
  • Assuming T1 sees T2's committed update immediately
  • Confusing REPEATABLE READ with READ COMMITTED
  • Thinking it causes errors on concurrent updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes