CS FundamentalsModerateIBM · Deloitte pattern

A transaction executes `UPDATE Accounts SET balance = balance - 100 WHERE id = 1;` followed immediately (same transaction) by `SELECT balance FROM Accounts WHERE id = 1;`, both before COMMIT. What value does the SELECT see, under ANY standard isolation level?

  1. A. The transaction's OWN uncommitted update is always visible to itself, regardless of isolation level — isolation levels govern visibility of OTHER transactions' changes, not a transaction's own in-progress changes
  2. B. NULL, since uncommitted changes are invisible to everyone, including the transaction that made them
  3. C. It depends entirely on whether autocommit is enabled
  4. D. The pre-update value, since the UPDATE hasn't committed yet

Correct answer: A. The transaction's OWN uncommitted update is always visible to itself, regardless of isolation level — isolation levels govern visibility of OTHER transactions' changes, not a transaction's own in-progress changes

Isolation levels are about what a transaction can see of concurrent OTHER transactions' work; every transaction always sees its own writes immediately, even before committing — otherwise a single transaction could never build on its own prior statements, which would make multi-statement transactions useless.

More DBMS and SQL questions

Exams that ask this topic