Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null vs. Zero for Primary Key
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01496573
Message ID:
01496574
Views:
97
>We are converting to a SQL Server database, and were debating whether to have the primary keys default to zero or null. What are the advantages/disadvantages to each?
>
>Jerry



PK can not be NULLable :-)

What you mean with default PK value?
For me PK must always have value and it must be not null.
Zero is meaning digit, but you can't have more than one record with zero in it.
BTW PK's often didn't carry any meaning information in them. I use Identity fields, other prefer uniquidentifiers.
So the whole debate is useless :-)) (at least for me).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform