explain primary key and foreign key with the help of an example
Answers
Answered by
15
Answer:
In simpler words, the foreign key is defined in a second table, but it refers to the primary key in the first table. For example, a table called Employee has a primary key called employee_id
A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables.
Explanation:
PLEASE MARK ME BRAINLIEST AND THANKS MY ANSWER
PLEASE FOLLOW ME
Answered by
2
• A primary key constrain is a column that uniquely identifies every row in the table of the relational database management system, while foreign key is a column that creates a relationship between two tables.
• Primary Key never accepts null values whereas foreign key may accept multiple null values.
Hope it helps you. Please mark as brainliest.
Similar questions