You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

How-to-insert-update-and-delete-data.sql 801B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. -- Exercise 1
  2. INSERT INTO categories (category_name)
  3. VALUES ('Brass')
  4. -- Exercise 2
  5. ???
  6. -- Exercise 3
  7. DELETE FROM categories
  8. WHERE category_id = 5
  9. -- Exercise 4
  10. INSERT INTO products(category_id, product_code, product_name, description, list_price, discount_percent, date_added)
  11. VALUES (4, 'dgx_640', 'Yamaha DGX 640 88-Key Digital Piano', 'Long description to come.', 799.99, 0, now())
  12. -- Exercise 5
  13. UPDATE products
  14. SET discount_percent = 35
  15. WHERE product_id = 11
  16. -- Exercise 6
  17. ???
  18. -- Exercise 7
  19. INSERT INTO customers(email_address, password, first_name, last_name)
  20. VALUES ('rick@raven.com', ' ', 'Rick', 'Raven')
  21. -- Exercise 8
  22. UPDATE customers
  23. SET password = "secret"
  24. WHERE email_address = 'rick@raven.com'
  25. -- Exercise 9
  26. UPDATE customers
  27. SET password = "reset"
  28. LIMIT 100
  29. -- Exercise 10
  30. ///