Suggest an editImprove this articleRefine the answer for “What is a foreign key (FOREIGN KEY)?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A foreign key (FOREIGN KEY) is a field or combination of fields in one table that references the primary key of another table, creating a link between the two; the database checks that the foreign key's value matches an existing value of the other table's primary key. **Key point:** when a record in the parent table is changed or deleted, the behavior can be configured, blocking the deletion, cascading the delete, or cascading the update; it's a "reference" to another table that keeps data consistent across tables.Shown above the full answer for quick recall.Answer (EN)ImageA **foreign key (FOREIGN KEY)** is a field or combination of fields in one table that **references the primary key of another table**, creating a link between the tables. ### The main points 1. **A link between tables**: a foreign key shows that a record in one table is connected to a record in another table. 2. **Supporting data integrity**: the database checks that the foreign key's value matches an existing value of the other table's primary key. 3. **Example**: - The `Employees` table has a `DepartmentID` field (a foreign key) that references the `ID` field in the `Departments` table. - That means every employee is tied to an existing department. 4. **Updates and deletes**: when a record in the parent table changes or is deleted, the behavior can be configured, blocking the delete, or cascading the delete or update. Put simply, **a foreign key is a "reference" to another table**, linking records together and keeping data consistent across tables.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.