Intel Corporation Interview Question

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

Interview Answer

Anonymous

Apr 10, 2018

A primary key uniquely identifies a row in the table it is a key for. A foreign key uniquely identifies a row from a different table in order to make its contents accessible from the table it is a foreign key for.