Null values
A field with no value at all. It is not zero and not an empty string. Test for it with IS NULL, never = NULL. A primary key can never be NULL.
Understanding Null values in QCE Digital Solutions Unit 2
What it does: NULL means no value, so it cannot be compared with =. IS NULL is the correct test. A primary key must uniquely identify each record, so SQL does not allow it to hold NULL. NULL is not equal to anything, even itself, so = NULL never matches. Use IS NULL to test for it. NOT NULL forces every row to have a value in that column. It does not add a default value by itself. Required values like the primary key should be NOT NULL. Optional details like a middle name can be NULL. Stock 0 is a known quantity. NULL would mean the stock level is unknown or not recorded.
Common mistakes: Nothing is ever equal to NULL, so = NULL never matches any row. Test for a missing value with IS NULL: WHERE house IS NULL;. An empty string '' is a value (text with no characters), not a missing value. To record that there is no phone number, set the field to NULL: SET phone=NULL.
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 186–228) and word search (Modules 144–228).
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
NULLFill in the Blanks
Spot the Error
Student with a class code? Join your class →