Wednesday, May 30, 2012

Unique key and Primary key

Unique key

1) Unique key can have nulls.
2)We can create multiple unique keys on a table.
3)Unique key Creates a non-Clustered Index by default.

Primary Key   

1)Primary key cannot have nulls.
2)We can have only one Primary key on a table.
3)Primary key Creates a Clustered Index by default.

Both Unique keys and Primary keys can be referenced by foreign key.

No comments:

Post a Comment



Custom Search
Protected by Copyscape Plagiarism Software