Essential Question: How can I use a wild card to search a SQL Table?
Mastery Objectives:
SWBAT select multiple values in the same field in SQL.
Format for using the IN Operator:
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1, value2, ...);
or this way:
SELECT column_name(s)
FROM table_name
WHERE column_name IN (SELECT STATEMENT);
Directions: Run the following queries into the SQL Editor https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_in and take a screenshot of your results. Paste the screenshot into google docs and write a short description description the results. Submit your google doc to google classroom.
SELECT * FROM Customers WHERE Country IN ('Germany', 'France', 'UK');
SELECT * FROM Customers WHERE Country NOT IN ('Germany', 'France', 'UK');
SELECT * FROM Customers WHERE Country IN (SELECT Country FROM Suppliers);
Create a query that selects the countries Colombia, Ireland, and Brazil.
Create a query that selects the cities London, Bogota, Lille, and Tokyo.
Create a query that selects 4 countries.
Create a query that selects 4 cities.
Create a query that selects not in 4 countries.
Create a query that selects not in 4 cities.