Flash cards
Review the key moves
What is the main idea behind SQL IN Keyword?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
Which statement best captures the main point of this lesson?
Complete the missing token from the example code.
___ * FROM CustomersPut the learning moves in the order that makes the concept easiest to apply.
In
The IN operator is used in the WHERE clause to check if a specified column's value matches any value within a provided list.
The IN operator functions as a shorthand for multiple OR conditions, making queries shorter and more readable.
The following SQL uses the IN operator to select all customers from Germany, France, or UK:
Example
SELECT * FROM Customers
WHERE Country IN ('Germany', 'France', 'UK');The following SQL selects all customers that are NOT located in "Germany", "France" or "UK":
Example
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:
Example
SELECT * FROM Customers
WHERE Country IN (SELECT Country FROM Suppliers);