[nycphp-talk] Need help understanding NULL

tedd tedd at
Sat Aug 29 19:30:12 EDT 2009

At 4:33 PM -0400 8/29/09, lists at wrote:
>Daniel Convissor wrote:
>>  This is useful, in part, for statistical purposes, since the null record
>>  won't be added into averages, etc.  For example, you had three surveys
>>  filled out.  Two people actually filled in their ages (10 and 20), if you
>>  do an average when using nulls, you'll get an average age of 15.  But if
>>  you use 0's instead of nulls, the average age will incorrectly be 10.
>Dan, this is very helpful--thank you! The light bulb is starting to come
>on in my head now...
>If anyone else has practical examples, please don't hold back.

Null is an odd critter. It's not an empty string, it's not '', it's 
not 0, it's NULL.

Try reading this:




More information about the talk mailing list