primary key and foreign key

All Questions

Asked by: Zoha Tazmen

What is the difference between a primary key and a foreign key in a database?

Answers (1)

A primary key is a unique identifier for each record in a database table. A foreign key is a field in a table that links to the primary key of another table, establishing a relationship between the two tables.

Answered by: Zoha Tazmen

Your Answer