NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
count() (Score:1)
Re: (Score:2)
Regrettably, this is something that much documentation [mysql.com] does not make clear. I'm expecting count() to return the number of instances of a particular value. Given that NULL can be thought of as "unknown", I suppose one could argue that it makes sense that it doesn't count the number of values. However, it also seems reasonable for one to assume that count(some_field) will return how many unknown values there are.
Your explanation is perfectly correct. I'm just frustrated that an arguably "intuitive" answe
Re:count() (Score:1)
Ditto Abigail about intuition. I think the way
COUNTworks in SQL w.r.t. NULLs is actually useful and helpful.Your stance about NULLs reminds me about the saying about GOTO and the apprentice, the journeyman and the master. (Not that I can claim to be a master, mind…)
Reply to This
Parent