Is there any difference between Primary Key and Unique key with not null?

 Posted by Kmandapalli on 1/20/2014 | Category: Sql Server Interview questions | Views: 789 | Points: 40
Answer:

Yes, ofcource the Primary key and unique key with not null are different as below:
1.Primary key will not allow null values whereas the unique key will allow.
2.in a table, there can be only one Primary Key column where as Unique key can be contained with any number of columns.
3.primary key is non-clustered index whereas unique key is a clustered index.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response