Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLtransactions BEGIN COMMITSingle-choice MCQ

In PostgreSQL at the default READ COMMITTED isolation level, what does the second SELECT return?

-- Session A BEGIN; SELECT count(*) FROM orders; -- returns 100 -- Session B (separate connection, runs fully here) INSERT INTO orders ... ; -- adds 5 rows COMMIT; -- Session A (same transaction, after B commits) SELECT count(*) FROM orders; -- ?