I'm trying to create these two tables:
CREATE TABLE Game_Reviews(
PRIMARY KEY(game_review_id, game),
game_review_id int,
game int,
date_posted date,
content varchar(100),
verified_reviewer varchar(20) FOREIGN KEY REFERENCES Verified_Reviewers,
FOREIGN KEY(game) REFERENCES Games
)
CREATE TABLE Game_Review_Comments(
PRIMARY KEY(comment_id, game_review),
comment_id int,
game_review int FOREIGN KEY REFERENCES Game_Reviews,
member varchar(20) FOREIGN KEY REFERENCES Members
)
But I'm getting an error saying:
The number of columns in the referencing column list for foreign key 'FK__Game_Revi__game___2022C2A6' does not match those of the primary key in the referenced table 'Game_Reviews'.
Although I'm not sure, I have a feeling that this error is due to the fact that when I reference Game_Reviews in the second table it doesn't know which primary key to use. How can I fix this?