In database terms, a foreign key is a column that is linked to another table‘s primary key field in a relationship between two tables.
A foreign key is a type of constraint, and so if you want to create a foreign key in SQL Server, you’ll need to create a foreign key constraint.
This article demonstrates how to create a foreign key constraint in SQL Server, using Transact-SQL.