What is FOREIGN KEY?

Technology CommunityCategory: SQLWhat is FOREIGN KEY?
VietMX Staff asked 3 years ago

FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.