SQL LIKE with the % wildcard
LIKE in a WHERE clause matches part of a text value. The % wildcard stands for any characters, so '%at%' finds text containing at, 'S%' starts with S and '%s' ends with s.
Understanding SQL LIKE with the % wildcard in ACARA Digital Technologies Years 7–8
What it does: A % on both sides of at means any characters can come before and after it, so at can be anywhere in the name. A% means A comes first, then any characters. '%A' would find names that END with A. % can match many characters, one character, or even no characters at all. The LIKE pattern is text, so it must be inside quotes: 'P%'. Smith starts with S. Ross only ends with s, so it would match '%s' instead. Football contains the letters at in the middle (footb-a-ll has no at; check: f-o-o-t-b-a-l-l). Pencil has no at either. The = operator only matches the whole value exactly. LIKE lets % stand for any characters.
Common mistakes: Without the % wildcard, LIKE 'P' only matches a name that is exactly P. To find names that start with P, write LIKE 'P%'. The fields in a SELECT list must be separated by a comma. It should be SELECT name, price.
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 365–411) and word search (Modules 331–411).
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
LIKE '%at%'Fill in the Blanks
Spot the Error
Student with a class code? Join your class →