Computer Science, asked by hearthacker54, 6 months ago

what is the difference between primary and foreign key​

Answers

Answered by rushikeshphapale4
3

Answer:

A primary key is used to ensure data in the specific column is unique. A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables. It uniquely identifies a record in the relational database table. ... Only one primary key is allowed in a table.

Answered by lavakumar1
0

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

Similar questions