Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any side effects in allowing NULL?
Message
De
31/03/2012 10:40:16
 
 
À
31/03/2012 10:24:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01539772
Message ID:
01539910
Vues:
72
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform