April 29, 2014 at 2:41 pm
Can we have blank value in Primary key field? Two fields are chosen as Primary Key for this table but the issue is at any given time one value will be blank when other is populated. Does sql server still order the records based on these keys? (Clustered index). Or should I just go about adding ID (identity)?
April 29, 2014 at 2:46 pm
SQL_Surfer (4/29/2014)
Can we have blank value in Primary key field?
Yes. It's a value like any other.
Does sql server still order the records based on these keys? (Clustered index).
Clustered indexes do not enforce physical order and do not enforce order of data returned, no matter what your key is.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply