December 19, 2002 at 9:02 am
What am I giving up if instead of choosing a primary key when I design a table, I create a unique clustered index instead? What are the systemic differences?
December 19, 2002 at 9:32 am
1) A primary key can be non-clustered.
2) A unique index will allow one null value. Of course, if the column is set to NOT NULL, it won't.
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
December 19, 2002 at 9:40 am
Two different things. Logically. The PK is the unqiue identifier for the data row. A unique index preseves uniqueness in the column.
Physically they are implemented the same.
Steve Jones
December 20, 2002 at 12:04 pm
Thanks! Always looking for a better understanding of what's under the hood.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply