24% Creates Data Manipulation Language (DML) Statements Flashcards
The Movie table has the following columns:
ID—integer
Title—variable-length string
Genre—variable-length string
RatingCode—variable-length string
Year—integer
Write a SQL statement to modify the Movie table to make the ID column the primary key.
The Movie table has the following columns:
ID—integer, primary key
Title—variable-length string
Genre—variable-length string
RatingCode—variable-length string
Year—integer
The YearStats table has the following columns:
Year—integer
TotalGross—bigint unsigned
Releases—integer
Write a SQL statement to designate the Year column in the Movie table as a foreign key to the Year column in the YearStats table
The Movie table has the following columns:
ID—integer, primary key
Title—variable-length string
Genre—variable-length string
RatingCode—variable-length string
Year—integer
Write a SQL statement to create an index named idx_year on the Year column of the Movie table.