Last post Feb 04, 2019 01:12 PM by PatriceSc
Member
361 Points
823 Posts
Feb 04, 2019 12:50 PM|3v3rhart|LINK
Can a foreign key be designated that is not a primary ID?
All-Star
48570 Points
18079 Posts
Feb 04, 2019 01:12 PM|PatriceSc|LINK
Hi,
From https://docs.microsoft.com/en-us/sql/relational-databases/tables/create-foreign-key-relationships?view=sql-server-2017
"A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table."
Member
361 Points
823 Posts
Primary v Foreign Key
Feb 04, 2019 12:50 PM|3v3rhart|LINK
Can a foreign key be designated that is not a primary ID?
All-Star
48570 Points
18079 Posts
Re: Primary v Foreign Key
Feb 04, 2019 01:12 PM|PatriceSc|LINK
Hi,
From https://docs.microsoft.com/en-us/sql/relational-databases/tables/create-foreign-key-relationships?view=sql-server-2017
"A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table."