Skip to content

Instantly share code, notes, and snippets.

@daltonpearson
Created December 7, 2017 00:20
Show Gist options
  • Save daltonpearson/d7cccdf701809ff20ab2dd51d25716c9 to your computer and use it in GitHub Desktop.
Save daltonpearson/d7cccdf701809ff20ab2dd51d25716c9 to your computer and use it in GitHub Desktop.
2A. Add the following playlist information to the database.
The playlist, Songs to Play to Your Pugs, was created on November 15, 2017, and it has the following songs
listed on it in this order:
i. You Got Gold
ii. Birds
iii.I Don’t Know Why
iv. Everywhere I Go
*/
INSERT INTO PLAYLIST(playListName,playListCreatedOn)
VALUES ('Songs to Play to Your Pugs', 'November 15, 2017')
INSERT INTO SONG_PLAYLIST(playlistID,songID,song_playlistOrder)
VALUES ((SELECT playlistID FROM PLAYLIST WHERE playListName = 'Songs to Play to Your Pugs'),(SELECT songID FROM SONG WHERE songName = 'You Got Gold'),1),
((SELECT playlistID FROM PLAYLIST WHERE playListName = 'Songs to Play to Your Pugs'),(SELECT songID FROM SONG WHERE songName = 'Birds'),2),
((SELECT playlistID FROM PLAYLIST WHERE playListName = 'Songs to Play to Your Pugs'),(SELECT songID FROM SONG WHERE songName = 'I Don''t Know Why'),3),
((SELECT playlistID FROM PLAYLIST WHERE playListName = 'Songs to Play to Your Pugs'),(SELECT songID FROM SONG WHERE songName = 'Everywhere I Go'),4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment