Primary and Foreign Keys
- How it worksHow does a foreign key in one table point at a primary key in another, linking the two tables together?
- Worked exampleWalk me through how a movie's id of 1442, used as a foreign key, connects a row in a stars table back to that movie.
- Common mistakeWhy isn't a foreign key required to be unique the way a primary key is?
Your turn1 of 2
A movie's id of 7267 is used as a foreign key in 13 separate rows of a stars table, one per actor in the movie. How many rows in the stars table reference that movie?