Search
Sponsor
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Forums Author
Mon, 20-Oct-2014 Authors
Gokulnidhy
10
Hemanth.Gottipati
10
Shanky11
10
All Time Authors
Jayakumars
4180
Karthikanbarasan
3455
Chvrsri
3140

Latest members | More ...


(Statistics delayed by 5 minutes)
 Forum Post

Difference between Unique Key and candidate key

Muhsinathk
Posted by Muhsinathk under Sql Server on 6/11/2012 8:19:36 AM | Points: 10 | Views : 7104 | Status : [Member] | Replies : 9


What is the difference between Unique Key and candidate key?



Posted by: Naraayanan on: 6/11/2012 [Member] Starter | Points: 25

Hi,
Check this link..
http://blog.sqlauthority.com/2009/10/22/sql-server-difference-between-candidate-keys-and-primary-key-2/

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/11/2012 [Member] Bronze | Points: 25

http://www.coolinterview.com/interview/24530/

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/11/2012 [Member] Bronze | Points: 25

Thank you Naraayanan

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/11/2012 [Member] Bronze | Points: 25

Posted by: .Netlearner on: 6/11/2012 [Member] Starter | Points: 25

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 key formed by combining at least two or more columns is
called composite key.

Refer this link for further details :http://blog.sqlauthority.com/2009/10/22/sql-server-difference-between-candidate-keys-and-primary-key-2/

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/11/2012 [Member] Bronze | Points: 25

An unique key and a primary key is a type of candidate key.


Thanks and Regards
Akiii

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/12/2012 [Member] Bronze | Points: 25

Thank youu

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sriramnandha on: 6/21/2012 [Member] Starter | Points: 25

Unique Key:

Unique key Restrict Duplicate Values and Null Values.Default Non Clustered index is an Unique Key

Example:

Create table Test(Testid int constraint pk_Test unique(Testid), TestName varchar(90))

Candidate Key:

Primary Key Alternative is an Candidate Key


Regards
Srriam.R

sriram

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gemamgall on: 6/27/2012 [Member] Starter | Points: 25

Candidate Key is a column in a table which has the ability to become a primary key.

Unique key is same as primary key but only difference is that unique key allows only one null value but primary does not allow even a single null value

Thanks and Regards,

Vinay Gandhi
www.quadtechindia.com

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response


Found interesting? Add this to: