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
PatternMatchesExample
'a%'Starts with aWHERE name LIKE 'K%' → Keyboard
'%a'Ends with aWHERE email LIKE '%@example.com'
'%or%'Contains orWHERE name LIKE '%oo%' → Notebook
'_a%'a as the 2nd characterWHERE city LIKE '_a%' → Lagos, Paris
NOT LIKEDoesn't matchWHERE name NOT LIKE '%Set%'
← MIN, MAX, COUNT, AVG & SUM