Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any side effects in allowing NULL?
Message
From
31/03/2012 10:40:16
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01539772
Message ID:
01539910
Views:
71
>>What do you put in the Age field when you don't know the age?
Good question, Viv.
The answer is that we need a rule.
Assuming that it's a numeric column, I might use -1 to indicate that the age isn't known. Someone else might use some other rule.
Why wouldn't I use NULL?
If I'm the poor bloke who looks at this table without knowing the rules, if I see -1 I'm alerted to the fact that someone did that on purpose and it must mean something so I'd better find out what it is.
If I see a NULL, I'm never sure that some sloppy programmer just didn't populate the column properly, as has happened to me on numerous occasions.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform