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
Kelly Clarkson
Happy Birthday
Clay Aiken
Star Spangled Banner
Clay Aiken
Row Your Boat
Justin Bieber
Battle of
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
