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 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy