CREATE TABLE Movie (
ID INT PRIMARY KEY,
Title VARCHAR(10),
Genre VARCHAR(10),
RatingCode VARCHAR(10),
Year INT
);
CREATE TABLE YearStats (
Year INT,
TotalGross BIGINT UNSIGNED,
Releases INT
);
ALTER TABLE Movie
ADD CONSTRAINT fk_movie_year
FOREIGN KEY (Year) REFERENCES YearStats(Year);
-- 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
-- Pay attention to the wording
-- Previous question will seem similar to this, but the table hasen't been created yet.
To embed this project on your website, copy the following code and paste it into your website's HTML: