Syntax
SQL Match a List with IN Syntax
In SQL, match a list with in: filters by a list of values — WHERE id IN (1, 2, 3)
Quick Answer
- Syntax
WHERE id IN (1, 2, 3)
SQLSyntax
Match a List with IN
Code example
WHERE id IN (1, 2, 3)
Filters by a list of values.
How to match a list with in in SQL
- Open your SQL file or editor.
- Copy the example, then replace its sample names and values for your code.
SQL Match a List with IN Syntax
Use WHERE id IN (1, 2, 3).
Related Syntax References
Frequently asked questions
What is the SQL syntax for match a list with in?
Use this pattern: WHERE id IN (1, 2, 3)
Can I copy this SQL code example?
Yes. Use Copy code and adapt the example to your program.
Is this SQL syntax different on Mac or Windows?
No. The language syntax is the same across operating systems.
Official source · How we verify