What is a foreign key?
-
A foreign key is a key field (column) in a database table, which relates the table to another table where the key is a primary key. The primary - foreign key relations are used to cross-reference database tables.
-
The foreign key is a SQL locking mechanism.
-
The foreign key is a column that can have NULL values.
-
None of the above
Reveal answer
Fill a bubble to check yourself
A
Correct answer
Explanation
A foreign key is a column (or set of columns) in one table that references the primary key of another table, creating a relationship between the two tables. This referential integrity constraint ensures that data remains consistent across related tables. Option B incorrectly describes it as a locking mechanism.