|
|
@@ -1,30 +1,53 @@ |
|
|
|
-- Exercise 1 |
|
|
|
|
|
|
|
INSERT INTO categories |
|
|
|
VALUES (default, 'Brass'); |
|
|
|
|
|
|
|
-- Exercise 2 |
|
|
|
|
|
|
|
UPDATE categories |
|
|
|
SET category_name = 'Woodwinds' |
|
|
|
WHERE category_id = 5; |
|
|
|
|
|
|
|
-- Exercise 3 |
|
|
|
|
|
|
|
DELETE FROM categories |
|
|
|
WHERE category_id = 5; |
|
|
|
|
|
|
|
-- Exercise 4 |
|
|
|
|
|
|
|
INSERT INTO products (product_id, category_id, product_code, product_name, description, list_price, discount_percent, date_added) |
|
|
|
VALUES (default, 4, 'dgx_640', 'Yamaha DGX 640 88-Key Digital Piano', 'Long description to come.', 799.99, 0, now()); |
|
|
|
|
|
|
|
-- Exercise 5 |
|
|
|
|
|
|
|
UPDATE products |
|
|
|
SET discount_percent = 35 |
|
|
|
WHERE product_id = 11; |
|
|
|
|
|
|
|
-- Exercise 6 |
|
|
|
|
|
|
|
DELETE FROM categories |
|
|
|
WHERE category_id = 4; |
|
|
|
DELETE FROM products |
|
|
|
WHERE product_id = 11; |
|
|
|
|
|
|
|
-- Exercise 7 |
|
|
|
|
|
|
|
INSERT INTO customers (email_address, password, first_name, last_name) |
|
|
|
VALUES ('rick@raven.com', '', 'Rick', 'Raven'); |
|
|
|
|
|
|
|
-- Exercise 8 |
|
|
|
|
|
|
|
UPDATE customers |
|
|
|
SET password = 'secret' |
|
|
|
WHERE email_address = 'rick@raven.com'; |
|
|
|
|
|
|
|
-- Exercise 9 |
|
|
|
|
|
|
|
UPDATE customers |
|
|
|
SET password = 'reset' |
|
|
|
LIMIT 100 |
|
|
|
|
|
|
|
|
|
|
|
-- Exercise 10 |
|
|
|
|