April 6, 2017 at 5:10 pm
gvoshol 73146 - Thursday, April 6, 2017 5:39 AMJeff Moden - Wednesday, April 5, 2017 4:54 PMI'm thinking that your plan of using MachineID+F1+Kant for the PK //snip//
He can't - 2 of those columns are nullable.
Which also makes a unique constraint harder to implement, but not impossible.
Ah... my apologies. To clarify, I was not suggesting any form of concatenation. It was meant to be a list of columns and I should have just used a comma to separate them.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 7, 2017 at 5:13 am
Jeff Moden - Thursday, April 6, 2017 5:10 PMgvoshol 73146 - Thursday, April 6, 2017 5:39 AMJeff Moden - Wednesday, April 5, 2017 4:54 PMI'm thinking that your plan of using MachineID+F1+Kant for the PK //snip//
He can't - 2 of those columns are nullable.
Which also makes a unique constraint harder to implement, but not impossible.Ah... my apologies. To clarify, I was not suggesting any form of concatenation. It was meant to be a list of columns and I should have just used a comma to separate them.
But nullable columns are not allowed in a PK, right? Or am I misremembering something?
April 7, 2017 at 7:06 am
gvoshol 73146 - Friday, April 7, 2017 5:13 AMJeff Moden - Thursday, April 6, 2017 5:10 PMgvoshol 73146 - Thursday, April 6, 2017 5:39 AMJeff Moden - Wednesday, April 5, 2017 4:54 PMI'm thinking that your plan of using MachineID+F1+Kant for the PK //snip//
He can't - 2 of those columns are nullable.
Which also makes a unique constraint harder to implement, but not impossible.Ah... my apologies. To clarify, I was not suggesting any form of concatenation. It was meant to be a list of columns and I should have just used a comma to separate them.
But nullable columns are not allowed in a PK, right? Or am I misremembering something?
Correct but you don't actually need a PK. It can be a UNIQUE clustered or non-clustered index.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply