My sql

Lb 4

– Changing Data

— 1. Create a new table in Chinook called RockTrack that contains all of the tracks in the Rock genre (genreid=1) by executing the following statement:

Create table RockTrack as (Select * from track where genreid=1);

— After creating the table run the following statement to set the primary key and auto_increment the trackid. If you do not do this, you may have trouble with some of the later queries.

ALTER TABLE RockTrack CHANGE trackid trackid INT primary key NOT NULL AUTO_INCREMENT;

— 2. Update trackid 2 to set the price at 1.19.

— 3. Update all tracks with albumId = 90, to change the composer to Axl Rose

— 4. Change trackid 2213 to reflect the following values:
— mediatypeid = 3
— milliseconds = 234000
— bytes = 6500000
— unitprice = 1.29

— 5. Add a record to the RockTrack table with the following information

— Trackid: 3700
— Name: MySQL Melodies
— AlbumId: 249
— MediaTypeId: 1
— GenreId: 1
— Composer: your name
— Milliseconds: 123456
— Bytes: 3333333
— UnitPrice: .99

— 6. Add a record to the RockTrack table with the following information. Accept default values for all other fields

— Name: Database Blues
— MediaTypeId: 3
— Millisecond: 200000
— UnitPrice: 1.09

— 7. Use a single query to add the following 3 tracks to the RockTrack Table
— Name Albumid Mediatypeid Genreid Composer Milliseconds Bytes UnitPrice
— Brookhaven Boogie 117 1 1 Thom Chesney 234567 6543210 0.99
— Homework Hell 249 1 1 Patti Burks 210987 7654321 0.99
— Computer Chaos 17 1 1 null 334455 6789123 0.99

— 8. Delete Trackid 2700 from the RockTrack table

— 9. Delete all the tracks in the RockTrack table with albumId 249

— 10. Delete all the tracks in the RockTrack table that do not have a composer
— What happens when you run this query? Why?

— When you are done with this lab, you can get rid of the RockTrack table by running this query:

DROP table RockTrack;

Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay