Learn SQL/Beginner/Filtering Data/SQL Wildcards (% and _)

SQL Wildcards (% and _)

Two characters, two very different jobs — any-length match versus exactly-one-character match.

What & Why

% matches any sequence of characters, including zero. _ matches exactly one character, no more, no less.

See How It Works

PATTERNS THAT MATCH `Spring Launch`
PatternWhy it matches 'Spring Launch'
`Spring%`Starts with "Spring"; % allows any remaining characters.
`%Launch`Ends with "Launch"; % allows any prefix.
`Spring_Launch`_ matches the single space between the two words.
`Spring_______`Seven underscores match exactly the seven characters in " Launch".

% matches any number of characters, while _ matches exactly one character.

Beginner business practice

Sign up free to try it on a real business scenario