Question: Chapter 5: How to Insert, Update, and Delete Data Write an INSERT statement that adds this row to the Categories table: category_name: Percussion Code the

Chapter 5: How to Insert, Update, and Delete Data

  1. Write an INSERT statement that adds this row to the Categories table:

category_name: Percussion

Code the INSERT statement so MySQL automatically generates the category_id column.

  1. Write an UPDATE statement that modifies the Percussion row you just added to the Categories table. This statement should change the category_name column to Woodies, and it should use the category_id column to identify the row.
  2. Write a DELETE statement that deletes the row you added to the Categories table in exercise 1. This statement should use the category_id column to identify the row.
  3. Write an INSERT statement that adds this row to the Products table:

product_id: The next automatically generated ID category_id: 4 product_code: dgx_640 product_name: Yamaha DGX 640 88-Key Digital Piano description: Long description to come. list_price: 944.25 discount_percent: 0 date_added: Todays date/time.

Use a column list for this statement.

  1. Write an UPDATE statement that modifies the product you added in exercise 4. This statement should change the discount_percent column from 0% to 35%.

*categories

seleSELECT `categories`.`category_id`, `categories`.`category_name` FROM `my_guitar_shop`.`categories`;

ct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!