WHERE on text, Boolean, character and date fields
The value in a WHERE condition must match the field's data type: text and characters go in quotes, numbers do not, and Boolean fields use TRUE or FALSE, e.g. Member = TRUE.
Understanding WHERE on text, Boolean, character and date fields in IGCSE Computer Science Paper 2
What it does: Character values like A are still text, so they need quotes in the condition. A date value is written in quotes, and operators such as > compare dates in order. A Boolean field is compared with TRUE or FALSE, not with words in quotes like 'No'.
Common mistakes: Grade is a character field, so the value must be in quotes. Without them, A looks like a field name. It should be WHERE Grade = 'A'. Town is a text field, so Leeds needs quotes. Without them SQL treats Leeds as a field name. It should be AND Town = 'Leeds';.
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 525–538) and word search (Modules 500–538).
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
WHERE Town = 'Leeds'Fill in the Blanks
Spot the Error
Student with a class code? Join your class →