Enter your query in SQL |
Some pattern queries: Show the SeenMovies tables Describe the columns of a table Select rows from a table and display them Insert a new row of values into a table Update an item in a table Delete an item from a table Delete a column from a table Add a column to a table Modify a column definition Add an index Change a column name Delete a table or index |
Are there any movies not seen?
Does this movie exist in the SeenMovies table? List a month's movies List any duplicate movie names Delete all the movies in a month |
Definition of the SeenMovie table
DROP TABLE IF EXISTS Persons; | ||
CREATE TABLE SeenMovies ( | ||
Name_ID | VARCHAR( 010 ) | UNIQUE NOT NULL, |
Name | VARCHAR( 100 ) | NOT NULL, |
DOB | Date | NULL, |
DOD | Date | NULL, |
PRIMARY KEY( Name ) ); | ||
DROP TABLE IF EXISTS Cities; | ||
CREATE TABLE Cities ( | ||
City_ID | INT( 004 ) | AUTO_INCREMENT, |
City | VARCHAR( 100 ) | UNIQUE NOT NULL, |
PRIMARY KEY( City_ID ) KEY( City ) ); | ||
DROP TABLE IF EXISTS Cemeteries; | ||
CREATE TABLE Cemeteries ( | ||
Cemetery_ID | INT( 004 ) | AUTO_INCREMENT, |
Cemetery | VARCHAR( 100 ) | UNIQUE NOT NULL, |
PRIMARY KEY( Cemetery_ID ) ); | ||
DROP TABLE IF EXISTS AItems; | ||
CREATE TABLE AItems ( | ||
Name_ID | VARCHAR( 010 ), | NOT NULL |
City_ID | INT( 004 ), | NULL |
Cemetery_ID | INT( 004 ), | NULL, |
PRIMARY KEY( Name_ID ) ); |