Primary Key uniquely identifies the record and the
UNIQUE index on the primary key ensures that no duplicates values will be stored in the table
1)Primary key creates an implicit clustered index on a table,
unique key does not create any implicit index.
2)Columns defined as primary key does not allow null values,
where as columns defined as unique can allow null values.
3)A table can have just one primary key (can be a composite key)
where as there can be multiple unique columns (keys).
4)Primary key is a unique key with the above mentioned features
http://msdn.microsoft.com/en-us/library/aa656402.aspx
No comments:
Post a Comment