GeekInterview.com
Series: Subject:
Question: 1 of 80

Sql Server

In which scenario I can use the unique key and primary key in SQL Server . I mean in real life database how can I judge where I have to use the unique key and primary key.
Asked by: varun.dtsfi | Member Since May-2012 | Asked on: May 24th, 2012

View all questions by varun.dtsfi

Showing Answers 1 - 2 of 2 Answers
kushgudseva

Answered On : May 29th, 2012

View all answers by kushgudseva

A Unique ID and Primary Key Constrain perform the ability to allow unique data in the column but only the Unique constrain allows NULL values in the field along with the unique data. Primary Key constrain fields allow Unique and Not NULL values.

  
Login to rate this answer.
sunil neha juhi singh

Answered On : Jun 28th, 2012

primary key=not allow null values,create cluster index by default.
unique key=allow only one null values and by default it create non cluster index

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.