IN in MySQL — How It Works

What the MySQL IN function does, with an example.

Published October 22, 2026

IN tests whether a value matches any value in a given list or subquery.

Key points

  • Part of standard SQL functions available in MySQL for working with query results

Example

SELECT * FROM products WHERE category IN ('Books', 'Electronics');
More SQL articles