DEV Community

Discussion on: SQL concepts from A to Z

Collapse
 
buinauskas profile image
Evaldas Buinauskas

A foreign key is a column that matches a primary key in another table so we can join the data in each together.

This is partially true. Foreign keys can also reference unique (alternate) keys. 👌

Also foreign key is not required to join data. It just enforces integrity. But you know that 😊