Question: learn _ zybooks.com / zybook / Database _ Essentials _ for _ Business _ with _ Lab _ _ _ 1 1 5 0 6

learn_zybooks.com/zybook/Database_Essentials_for_Business_with_Lab___11506/chapter/4/section/2
My library > BIS 245: Database Essentials for Business with Lab home >4.2. Join queries
zyBooks catalog
(?) Help/FAQ
PARTICIPATION
ACTIVITY
4.2.9: Join coding exercise.
The SQL below creates Genre and Song tables, inserts some genres and songs, and performs an inner join.
Run the SQL. Verify the result table does not include songs with NULL genre or genres that are not associated with songs.
Make the following changes:
In the CREATE TABLE statement for Song, rename GenreCode to Code. Modify the SELECT statement to work with the new name. Run the SQL and verify the result table is unchanged.
2 Modify the SELECT statement to perform a left join. Run the SQL and verify the result table includes songs with NULL genre
Modify the SELECT statement to perform a right join. Run the SQL and verify the result table includes genres that are not associated with any songs:
Combine the left and right joins into one statement that performs a full join. Run the SQL and verify the result table includes all songs and genres.
Hints-In steps 2 and 3, use keywords LEFT and RIGHT. In step 4, use keyword UNION, since MySQL does not support FULL JOIN.
CREATE TABLE SOng (
COde CHAR(3),
Name VARCHAR (20),
Description VARCHAR(200),
PRIMARY KEY(Code)
Search
 learn_zybooks.com/zybook/Database_Essentials_for_Business_with_Lab___11506/chapter/4/section/2 My library > BIS 245: Database Essentials for Business with

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