Question: In this assignment you will write a script that demonstrates how to use a table variable. Use your credentials for the SQL server. Create a

In this assignment you will write a script that demonstrates how to use a table variable.
Use your credentials for the SQL server.
Create a schema to model this story: It's Hollywood Week on American Idol. An American Idol contestant will sing zero or more songs during the competition. A particular song will be sung by one or more contestants. A contestant will sing a particular song on a particular date. Your schema should track contestants, songs, and songs, sung by each contestant.
Write a script that uses a table variable to hold the results of joining the tables in order to get this report:
Report
Contestant
Song
Date Sung
Kelly Clarkson
Row Your Boat
1/1/2022
Kelly Clarkson
Happy Birthday
2/2/2022
Clay Aiken
Star Spangled Banner
1/1/2022
Clay Aiken
Row Your Boat
2/2/2022
Justin Bieber
Battle of 1812
3/3/2022
You are not writing the report. You are demonstrating the use of table variables in a script to provide the data for the report.
In a Word document, paste in your complete script along with screenshots of your table schemas, table contents, and the execution of the script.

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 Programming Questions!