What is the relationship and difference between a primary and foreign key?
Answers
Answered by
1
Answer:
PRIMARY KEY:
It cannot be NULL.
Only one primary key in the table.
In each row it is unique.
example:student_id
FOREIGN KEY:
It can Null values.
Any number of foreign key in the table.
It is used to link two table.In one table it is the primary key and another table it is not.
Explanation:
Answered by
1
Answer: Primary key is used to identify data uniquely therefore two rows can't have the same primary key. It can't be null. On the other hand, foreign key is used to maintain relationship between two tables. Primary of a table act as forgein key in the other table.
Please mark me as brainliest
Similar questions
Math,
4 months ago
Hindi,
4 months ago
Environmental Sciences,
4 months ago
Math,
9 months ago
Math,
1 year ago