What & Why
The IN operator is used to match a column against any value in a list. IN keeps filters readable when the business rule allows several accepted values, such as selected countries, channels, plans, or teams.
See how it works
A growth analyst wants users from a short list of priority markets.
SELECT
id,
country,
plan
FROM growth.users
WHERE country IN ('US', 'CA', 'GB');
Syntax pattern
See explanation
WHERE column_name IN ('value_a', 'value_b')
- IN is cleaner than repeated OR checks for the same column.
- Values inside IN must match the column type.
- NOT IN excludes listed values, but be careful with NULLs.
Now You Try
Practice this concept hands-on
Sign up for a free account to run SQL against real datasets right here in the browser and get instant AI feedback. No credit card required.
Sign up free