Use IN to return rows with a value contained in a list
suggest changeThis 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents