The FOREIGN KEY constraint is used to enforce a link between the data in two tables. A foreign key in one table points to a primary key in another table, maintaining referential integrity.
Foreign keys help ensure consistency between related database tables. The current database review process always encourages you to add foreign keys when creating tables that reference records from ...