Guided Notes
LIKE, IN, BETWEEN & Aliases
Pattern matching with LIKE and wildcards, list matching with IN, ranges with BETWEEN, and readable results with column and table aliases.
LIKE and wildcards
Slide 1 / 5| Pattern | Matches | Example |
|---|---|---|
| 'a%' | Starts with a | WHERE name LIKE 'K%' → Keyboard |
| '%a' | Ends with a | WHERE email LIKE '%@example.com' |
| '%or%' | Contains or | WHERE name LIKE '%oo%' → Notebook |
| '_a%' | a as the 2nd character | WHERE city LIKE '_a%' → Lagos, Paris |
| NOT LIKE | Doesn't match | WHERE name NOT LIKE '%Set%' |
