Use IN to return rows with a value contained in a list

suggest change

This example uses the Car Table from the Example Databases.

SELECT *
FROM Cars
WHERE TotalCost IN (100, 200, 300)

This query will return Car #2 which costs 200 and Car #3 which costs 100. Note that this is equivalent to using multiple clauses with OR, e.g.:

SELECT *
FROM Cars
WHERE TotalCost = 100 OR TotalCost = 200 OR TotalCost = 300

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Filter results using WHERE and HAVING:
*Use IN to return rows with a value contained in a list

Table Of Contents