Political Science, asked by Wenbing, 4 months ago

what is forean key?​

Answers

Answered by ItzTwinklingStar
118

Answer:

A FOREIGN KEY is a key used to link two tables together. A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table. ... The FOREIGN KEY constraint is used to prevent actions that would destroy links between tables.

Explanation:

Foreign keys are the columns of a table that points to the primary key of another table. They act as a cross-reference between tables. For example: In the below example the Stu_Id column in Course_enrollment table is a foreign key as it points to the primary key of the Student table.

Similar questions