Ad Code

Candidate key Vs Primary key

Explain the difference between Candidate Key and Primary Key by their functionality.



Actually a candidate key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple candidate keys in one table. Each candidate key can qualify as Primary Key.
On the other hand a primary key is a column or a combination of columns that uniquely identify a record. Only one candidate key can be primary key which means a table can have only one primay key.  For a candidate key to qualify as a primary key, it should be Non-NULL and unique in any domain.
Reactions

Post a Comment

0 Comments