IN checks a column against a list
Instead of writing multiple OR checks, IN lets you test a column against a whole list in one go. Put the choices inside parentheses, separated by commas. A row appears in your results if it matches any item on that list.
A tiny example
In plain English: Show me the drinks that are small, medium, or large.
SELECT name, size
FROM drinks
WHERE size IN ('small', 'medium', 'large');Query result
| name | size |
|---|---|
| Cortado | small |
| Latte | medium |
| Cold brew | large |
Each drink is small, medium, or large — one of the values in the list.
Common questions
- Is IN faster than chaining OR?
- They usually run the same; the database treats IN as shorthand for OR checks. The real win is readability: one tidy list instead of a long chain.
- Can IN hold numbers as well as text?
- Yes. Numbers go in bare, like IN (3, 4, 5), and text values need quotes, like IN ('latte', 'mocha').
Related SQL lessons
Practice IN step by step
The Foundations Track has beginner puzzles built around this idea. Tap tiles, see real results. No terminal, no setup.
practice this in the courseReady for a break?
A fresh, bite-sized SQL puzzle waits every morning. Tap tiles, see real results. No terminal, no setup, no timers.
Try today's free SQL puzzle