AI engineering glossary · SQL databases

What is IN operator?

IN operator: A condition that is true when a value equals any item in a given list or in the result of a subquery. It is shorthand for several OR comparisons. NOT IN behaves unexpectedly if the list contains NULL.

Level: beginnerTopic: SQL databases

IN operator: an example

WHERE city IN ('Mumbai','Pune','Nagpur') keeps rows from any of those three cities.

Related terms

More SQL databases terms

Where you learn it

IN operator is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.