Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

What metaphors might describe how we work together?

Answered: 1 week ago

Question

Knowledge of process documentation (process flow charting)

Answered: 1 week ago