What is the difference between Unique Key and Primary key?
1)There can be only one Primary key possible in a table but there can be many unique keys possible in a table.
2)Primary key do not allow NULL values but a Unique key allow one NULL value.If we try to insert NULL value into the primary key, we get an error message.
3)When a Primary key is created, a clustered index is made by default but if an Unique key is created, a non-clustered index is created by default.
Read More..   [0 clicks]
Published under: SQL Server Interview Questions · · · ·