Skip to main content
SQL • LESSON 46

IN

How can we match a column against several possible values?

Beginner3 Minutes590 XP
🤔 THE QUESTION

How can we match a column against several possible values?

💡 WHAT IS IT?

The IN operator checks whether a column value matches any value within a discrete list of literals or subquery results.

🎯 WHAT IS IT USED FOR?

Targeting specific departments, status flags, country lists without repeating multiple OR statements.

💻 EXAMPLE
SELECT name, department
FROM employees
WHERE department IN ('Engineering', 'Analytics', 'Finance');

🎯 Mission Objectives

Practice typing production-grade SQL code for IN.

  • IN operator
  • Set membership
  • List filtering
  • Clean syntax