beginnerIsolation Levels — Dirty Read, Phantom Read, Non-Repeatable Read
What is the difference between READ COMMITTED and REPEATABLE READ?
READ COMMITTED: each SQL statement sees the most recently committed data at statement start. If Transaction B commits between two SELECT statements in Transaction A, Transaction A's second SELECT sees Transaction B's changes. Prevents dirty reads only. REPEATABLE READ: the entire transaction sees data as of the transaction's start time. Transaction A gets a consistent snapshot: even if Transaction
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response