· 5 years ago · Oct 30, 2020, 01:54 AM
1CREATE DATABASE IF NOT EXISTS quiz;
2USE quiz;
3
4CREATE TABLE IF NOT EXISTS CDs
5(
6CDID SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
7CDName VARCHAR(50) NOT NULL,
8InStock SMALLINT UNSIGNED NOT NULL,
9OnOrder SMALLINT UNSIGNED NOT NULL,
10Reserved SMALLINT UNSIGNED NOT NULL,
11Department ENUM('Classical', 'Popular') NOT NULL,
12Category VARCHAR(20) NOT NULL
13);
14
15INSERT INTO CDs (CDName, InStock, OnOrder, Reserved, Department, Category)
16VALUES ('Bloodshot', 10, 5, 3, 'Popular', 'Rock'),
17('The Most Favorite Opera Duets', 10, 5, 3, 'Classical', 'Opera'),
18('New Orleans Jazz', 17, 4, 1, 'Popular', 'Jazz'),
19('Music for Ballet Class', 9, 4, 2, 'Classical', 'Dance'),
20('Music for Solo Violin', 24, 2, 5, 'Classical', 'General'),
21('Cie li di Toscana', 16, 6, 8, 'Classical', 'Vocal'),
22('Mississippi Blues', 2, 25, 6, 'Popular', 'Blues'),
23('Pure', 32, 3, 10, 'Popular', 'Jazz'),
24('Mud on the Tires', 12, 15, 13, 'Popular', 'Country'),
25('The Essence', 5, 20, 10, 'Popular', 'New Age'),
26('Embrace', 24, 11, 14, 'Popular', 'New Age'),
27('The Magic of Satie', 42, 17, 17, 'Classical', 'General'),
28('Swan Lake', 25, 44, 28, 'Classical', 'Dance'),
29('25 Classical Favorites', 32, 15, 12, 'Classical', 'General'),
30('La Boheme', 20, 10, 5, 'Classical', 'Opera'),
31('Bach Cantatas', 23, 12, 8, 'Classical', 'General'),
32('Golden Road', 23, 10, 17, 'Popular', 'Country'),
33('Live in Paris', 18, 20, 10, 'Popular', 'Jazz'),
34('Richland Woman Blues', 22, 5, 7, 'Popular', 'Blues'),
35('Morimur (after J. S. Bach)', 28, 17, 16, 'Classical', 'General'),
36('The Best of Italian Opera', 10, 35, 12, 'Classical', 'Opera'),
37('Runaway Soul', 15, 30, 14, 'Popular', 'Blues'),
38('Stages', 42, 0, 8, 'Popular', 'Blues'),
39('Bach: Six Unaccompanied Cello Suites', 16, 8, 8, 'Classical', 'General');