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.

Learn More

How to match a list with in in SQL

  1. Open your SQL file or editor.
  2. 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