Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 4498 |  Welcome, Guest!   Register  Login
 Home > Forums > Sql Server > Difference between Unique Key and candidate key ...
Muhsinathk

Difference between Unique Key and candidate key

Replies: 9 | Posted by: Muhsinathk on 6/11/2012 | Category: Sql Server Forums | Views: 1099 | Status: [Member] | Points: 10  


What is the difference between Unique Key and candidate key?


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Naraayanan
Naraayanan  
Posted on: 6/11/2012 8:22:44 AM
Level: Starter | Status: [Member] | 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. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 6/11/2012 8:24:41 AM
Level: Bronze | Status: [Member] | Points: 25

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

Muhsinathk
Muhsinathk  
Posted on: 6/11/2012 8:25:26 AM
Level: Bronze | Status: [Member] | Points: 25

Thank you Naraayanan

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

Muhsinathk
Muhsinathk  
Posted on: 6/11/2012 8:27:07 AM
Level: Bronze | Status: [Member] | Points: 25

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

.Netlearner
.Netlearner  
Posted on: 6/11/2012 8:28:49 AM
Level: Starter | Status: [Member] | 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. | Reply | Alert Moderator 

Akiii
Akiii  
Posted on: 6/11/2012 10:19:49 AM
Level: Bronze | Status: [Member] | 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. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 6/12/2012 12:01:21 AM
Level: Bronze | Status: [Member] | Points: 25

Thank youu

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

Sriramnandha
Sriramnandha  
Posted on: 6/21/2012 5:40:25 AM
Level: Starter | Status: [Member] | 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. | Reply | Alert Moderator 

Gemamgall
Gemamgall  
Posted on: 6/27/2012 11:26:28 AM
Level: Starter | Status: [Member] | 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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 2:41:18 AM