AI engineering glossary · SQL databases

What is phantom read?

Phantom read: An anomaly where the same query run twice inside a transaction returns different sets of rows because another transaction inserted or deleted matching rows in between. It affects sets of rows rather than one row.

Level: advancedTopic: SQL databases

Phantom read: an example

Counting orders over ₹1,000 gives 40, then 41 in the same transaction after someone commits a new large order.

Related terms

More SQL databases terms

Where you learn it

Phantom read is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.