If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

SQL: Filter with IN

When you are issuing a SELECT and want to find all the rows where a particular column value is one of a number of values, you can use the IN operator followed by comma-separated values in parentheses. It's equivalent to using OR multiple times, but more concise. You can also use NOT IN to do the inverse query.
▶️ You can also learn about this in our Querying IN subqueries talkthrough.

Want to join the conversation?

No posts yet.