Lesson 5 / 37 · Conditions and NULL
IN, LIKE and BETWEEN are ordinary conditions
They read differently but behave like any other test: each yields ✓, ✗ or ∅ per row. % in LIKE matches any run of characters, and LIKE is case-sensitive; ILIKE ignores case.
The query
SELECT name, country, signup_date
FROM customers
WHERE country IN ('US', 'DE', 'FR')
AND name LIKE '%a%'
AND signup_date BETWEEN DATE '2023-01-01' AND DATE '2023-03-31'
Try ILIKE: Alice passes too, and 2 customers remain.
Next: NULL is not FALSE, and it is not TRUE either · All lessons