Question: Using the My Guitar Shop database you installed in Module 1 , develop the following queries. To test whether a table has been modified correctly

Using the My Guitar Shop database you installed in Module 1, develop the following queries.
To test whether a table has been modified correctly as you do these exercises, you can write and run an appropriate SELECT statement.
1. Write an INSERT statement that adds this row to the Categories table:
category_name: Brass
Code the INSERT statement so MySQL automatically generates the category_id column. Execute the query and take a screenshot of the query and the results.
2. Write an UPDATE statement that modifies the row you just added to the Categories table. This statement should change the category_name column to Woodwinds, and it should use the category_id column to identify the row. Execute the query and take a screenshot of the query and the results.
3. 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. Execute the query and take a screenshot of the query and the results.
4. Write an INSERT statement that adds this row to the Products table:
product_id:
category_id:
product_code:
product_name:
description:
list_price:
discount_percent:
date_added:
The next automatically generated ID
4
dgx_640
Yamaha DGX 64088-Key Digital Piano
Long description to come.
799.99
0
Todays date/time.
Use a column list for this statement. Execute the query and take a screenshot of the query and the results

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!