Tsallaka zuwa abun ciki
Justice Tech School

IS NULL and IS NOT NULL

NULL is unknown, so = NULL never works. Use IS NULL.

Example
SELECT name FROM students WHERE score IS NULL;
SELECT COUNT(*) AS filled FROM students WHERE score IS NOT NULL;

Result

filled
7

Exercise

Missing scores.

WHERE score  NULL

Quiz Test

Why does score = NULL fail?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.