[Solved]Create One Script File Action Queries Listed Save Syou Name Chap7practicesql Put Comment Q Q37188093


You will create one script file for the action queries listed below and save it as syou name>Chap7Practice.sql. Put a comment above each query indicating the problem number such as – Query #1. You will review your answers with me or another student during a class session. You will need to use the GuitarShop_Chap07 database. Each query is worth 1 point. 1. Write a Select Into statement three times that will create the following 3 tables: your initials> Categories <your initials> Products <your initials Customers Now add three Drop Table statements before the Select Into statements to delete the 3 tables starting with your initials in case you need to recreate your tables. 2. Write an INSERT statement that adds this row to the <your initials> Categories table: CategoryName Brass Code the INSERT statement so SQL Server automatically generates the value for the CategoryID column. Write an UPDATE statement that modifies the row you just added to the <your initials>Categories table. This statement should change the CategoryName column to “Woodwinds”, and it should use the CategoryID column to identify the row. 3. 4. Write a DELETE statement that deletes the row you added to the <your initials> Categories table in exercise 2·This statement should use the CategoryID column to identify the row. 5. Write an INSERT statement that adds this row to the your initials> Products table: The next automatically generated ID ProductID: CategoryIID ProductCode: dgx 640 Yamaha DGX 640 88-Key Digital Piano Long description to come. 799.99 ProductName Description ListPrice: DiscountPercent: Date Added: Today’s date/time. Use a column list for this statement. Write an UPDATE statement that modifies the product you added in exercise S. This statement should change the DiscountPercent column from 0% to 35%. 6. Write a DELETE statement that deletes the row in the <your initials> Categories table that has an ID of 4. 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 7. deletes all products in this category. 8. Write an INSERT statement that adds this row to the syour initials> Customers table: rick@raven.com (empty string) Rick Raven Password FirstName: LastName Use a column list for this statement. te an UPDATE statement that modifies the <your initials Customers table. Change the password column to “secret” for the customer with an email address of rick@raven.com. 9. Wri 10. Write an UPDATE statement that modifies the <your initials> Customers table. Change column to “reset” for every customer in the table. CIs 111 Chapter 7 Practice Lab Show transcribed image text You will create one script file for the action queries listed below and save it as syou name>Chap7Practice.sql. Put a comment above each query indicating the problem number such as – Query #1. You will review your answers with me or another student during a class session. You will need to use the GuitarShop_Chap07 database. Each query is worth 1 point. 1. Write a Select Into statement three times that will create the following 3 tables: your initials> Categories Products Products table: The next automatically generated ID ProductID: CategoryIID ProductCode: dgx 640 Yamaha DGX 640 88-Key Digital Piano Long description to come. 799.99 ProductName Description ListPrice: DiscountPercent: Date Added: Today’s date/time. Use a column list for this statement. Write an UPDATE statement that modifies the product you added in exercise S. This statement should change the DiscountPercent column from 0% to 35%. 6. Write a DELETE statement that deletes the row in the Categories table that has an ID of 4. 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 7. deletes all products in this category.
8. Write an INSERT statement that adds this row to the syour initials> Customers table: rick@raven.com (empty string) Rick Raven Password FirstName: LastName Use a column list for this statement. te an UPDATE statement that modifies the
Expert Answer
Answer to You will create one script file for the action queries listed below and save it as syou name>Chap7Practice.sql. Put a co… . . .
OR

