TheAnalyst / SQLAll lessons ↗
Day 4 · Core SQL · 10–20 minutes

NULL and missing values

NULL represents an unknown or missing value. Test it with IS NULL, not = NULL.

01 · Learn

The idea

NULL represents an unknown or missing value. Test it with IS NULL, not = NULL. Read the query line by line and identify the input table, the transformation, and the shape of the result before running it.

SELECT name FROM customers WHERE country IS NULL;
Read it actively

Before running the example, predict the output columns and whether the query returns one row, many rows, or possibly no rows.

02 · Recall

Explain it without looking

In your own words, explain the main SQL feature in today’s lesson and why it answers the question.

03 · Solve

Run your own query

Find customers whose country has not been recorded.

Loading browser SQL engine…
04 · Repeat

Close the loop