Interview Q&A / PostgreSQL
PostgreSQL interview questions
Indexes, EXPLAIN, transactions and isolation, JSONB and the Postgres specifics backend interviews probe.
Prefer rapid revision? Practise PostgreSQL short interview answers →
- Why does WHERE col = NULL return no rows in PostgreSQL, and what should you use instead?
NULL means unknown, so comparing anything to it with = gives NULL, not true, and WHERE keeps only true rows. Use IS NULL, or IS NOT DISTINCT FROM when you want NULLs treated as equal.
BeginnerQuick answer1 min read