NULL values and IS NULL
NULL marks a missing value. Test for it with IS NULL or IS NOT NULL, because = NULL never matches. NULL is not a blank or 0, and aggregates ignore it.
Understanding NULL values and IS NULL in WA Computer Science ATAR Unit 2
What it does: IS NULL is the only test that matches a missing value. Writing = NULL gives no matches. NULL means no value has been stored. It is different from a blank text value or the number 0. Aggregates like AVG, SUM, MIN and MAX ignore NULL. AVG is (80 + 60) / 2 = 70, not divided by 3. COUNT(field) counts only non-NULL values. COUNT(*) would count all 10 rows. NULL means unknown or missing, so comparing it with = is never true. IS NULL is needed.
Common mistakes: = NULL never matches, because NULL is not equal to anything, not even NULL. Use IS NULL to find missing phone numbers. COUNT(mark) ignores NULL values, so on rows where mark is NULL it counts nothing and returns 0. Use COUNT(*) to count the rows.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 28–122) and word search (Modules 28–266).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
IS NULLFill in the Blanks
Spot the Error
Student with a class code? Join your class →