Question · SQL and MySQL course · Module 9: Indexes and normalization
Why a foreign key
What is a foreign key (FOREIGN KEY) used for?
Answer options
- It encrypts the data in a column
- It links a column of one table to the primary key of another and guards integrity (it won't let you point to a non-existent author)
- It creates a backup copy of the table
- It changes the column type to numeric
You can check the correct answer by solving this task in the CodeWorlds game.