24% Creates Data Manipulation Language (DML) Statements Flashcards

1
Q

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.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly