HI
Difference Between Candidate Keys and Primary Key.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 5, 2012, 1:39 AM
A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.
A Primary Key is a column or a combination of columns that uniquely identify a record. Only one Candidate Key can be Primary Key.
for more info, please refer
http://blog.sqlauthority.com/2009/05/30/sql-server-difference-between-candidate-keys-and-primary-key/
hope this help
AartiPosted Dec 21, 2011, 2:38 AM
A table may have more than one combination of set of columns that could uniquely identify the rows in a table. Each combination is a Candidate key.
We pick one of the Candidate keys to be the Primary key.
Primary Key dont have NULL values, where as Candidate key column may contain one NULL value record.
and By default Primary key is Clustered index.
Satyapriya NayakPosted Nov 21, 2011, 1:08 PM
Candidate Key – 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.
Primary Key – A Primary Key is a column or a combination of columns that uniquely identify a record. Only one Candidate Key can be Primary Key.
One needs to be very careful in selecting the Primary Key as an incorrect selection can adversely impact the database architect and future normalization. For a Candidate Key to qualify as a Primary Key, it should be Non-NULL and unique in any domain. I have observed quite often that Primary Keys are seldom changed. I would like to have your feedback on not changing a Primary Key.
Refer link
http://blog.sqlauthority.com/2009/10/22/sql-server-difference-between-candidate-keys-and-primary-key-2/
Thanks