Transaction A | Transaction B |
BEGIN TRANSACTION; SELECT A FROM T; --sees the old state INSERT INTO T VALUES (7); SELECT A FROM T; --sees the old state + value 7 COMMIT; | BEGIN TRANSACTION; SELECT A FROM T; --sees the same old state SELECT A FROM T; --sees the old state without 7 SELECT A FROM T; --sees the old state without 7 COMMIT; --new transaction starts SELECT A FROM T; --sees the new state including 7 |