Question of the Day Four
Let us continue our question of the day series with day four.
What is the difference between a primary key and a unique key?
The unique key and the primary key designation both enforce that the particular column is unique. However, the primary key will create a clustered index using that column and a unique key will create a non-clustered index. This is the fundamental difference in the two. Another minor difference is that the unique key allows you to have one null value and the primary key does not allow any use of the null value.
Enjoy!
Posted on August 6, 2012, in SQL Schoolhouse and tagged SQL Learning. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0