Module 10
Module 10
If you wish you may create and query an actual table to verify that your answers are correct.
2. Write a statement that will select the City column from the Customers table.
3. Select all records where the City column has the value "Berlin".
4. Use the NOT keyword to select all records where City is NOT "Berlin".
5. Select all records where the CustomerID column has the value 32.
6. Select all records where the City column has the value 'Berlin' and the Zip column has the
value 12209.
7. Select all records where the City column has the value 'Berlin', and also the records where the
City column has the value 'London'.
8. Select all records from the Customers table, sort the result alphabetically by the column City.
10. Select all records from the Customers table, sort the result alphabetically, first by the column
Country, then, by the column City.
11. Select all records from the Customers where the Zip column is empty.
12. Select all records from the Customers where the Zip column is NOT empty.
14. Set the value of the City columns to 'Oslo', but only the ones where the Country column has
the value "Norway".
ANSWER HERE:
15. Update the City column of all records in the Customers table to 'Berlin'.
ANSWER HERE:
16. Update the City value to 'Pensacola' and the Country value to 'USA'.
ANSWER HERE:
17. Delete all the records from the Customers table where the Country value is 'Pensacola'.
ANSWER HERE:
ANSWER HERE:
Shopping Cart Project (Order and Item tables):
19. Write an SQL insert statement to insert an Order into the ORDER table
ANSWER HERE:
20. Write an SQL insert statement to insert an Item into the ITEM table (corresponding to the
order you just created).
ANSWER HERE: