The IN condition allows us to check if there is a match in terms of value.


IN (value)


IN (subquery)


Let’s select users with an ID 5, 7, 9, 11.

SELECT first_name, last_name, username
FROM users
WHERE id IN (5,7,9,11);

Let’s select users with different positions

SELECT u.first_name, u.last_name, p.position
FROM users u
JOIN positions p on = u.position_id
WHERE IN ("software engineer", "senior software engineer", "engineering manager");