Question: MYSQL Chapter 5 How to insert, update, and delete data Exercises appropriate SELECT statement. 1. Write an INSERT statement that adds this row to the

 MYSQL Chapter 5 How to insert, update, and delete data Exercises

MYSQL

Chapter 5 How to insert, update, and delete data Exercises appropriate SELECT statement. 1. Write an INSERT statement that adds this row to the Categories table: Brass category name Code the INSERT statement so MySQL automatically generates the category_id column. Write an UPDA TE statement that modifies the row you just added to the Categories table. This statement should change the product_name column to "Woodwinds", and it should use the category id column to identify the row. 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 2. 3. 4. Write an INSERT statement that adds this row to the Products table: product id category id: product_code product name: description: list price: The next automatically generated ID 4 dgx 640 Yamaha DGX 640 88-Key Digital Piano Long description to come. 799.99 discount percent Today's date/time. date added Use a column list for this statement. 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%. Write a DELETE statement that deletes the record with category_id 4 from the Categories table. 5. 6. When you execute this statement, it will produce an error since the category has related rows in the Products table. To fix that, precede the DELETE statement with another DELETE statement that deletes all products in this category. (Remember that to code two or more statements in a script, you must end each statement with a semicolon.)

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!