Loading lesson path
Concept visual
Start at both ends
❮ SQL Keywords
IN
operator is used in the WHERE clause to check if a specified column's value matches any value within a provided list.
operator functions as a shorthand for multiple OR conditions, making queries shorter and more readable.
operator to select all customers from Germany, France, or UK:
SELECT * FROM Customers
WHERE Country IN ('Germany', 'France', 'UK');
The following SQL selects all customers that are NOT located in "Germany", "France" or "UK":SELECT * FROM Customers
WHERE Country NOT IN ('Germany', 'France', 'UK');The following SQL selects all customers that are from the same countries as the suppliers:
SELECT * FROM Customers
WHERE Country IN (SELECT Country FROM Suppliers);❮ SQL Keywords