What's the difference between a primary key and a unique
key?
Answer Posted / swapna
Both primary key and unique enforce uniqueness of the
column on which they are defined. But by default primary
key creates a clustered index on the column, where are
unique creates a nonclustered index by default. Another
major difference is that, primary key doesn't allow NULLs,
but unique key allows one NULL only.
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
Is mysql the same as sql server?
What is a document index?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
What is database architecture? : SQL Server Architecture
what is a major difference between sql server 6.5 and 7.0 platform wise? : Sql server database administration
Explain atomicity?
Explain how to use linked server?
Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?
What is temporal data type?
Is it possible to have clustered index on separate drive from original table location?
what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
What is blocking?
What is replace and stuff function in sql server?
Can we add an identity column to decimal datatype?
Explain transaction server consistency?