Re: NULL values or Zero in numeric fields?

From: John P. Higgins <jh33378_at_deere.com>
Date: 1995/11/29
Message-ID: <DIttu3.H1E_at_deere.com>#1/1


francois.lachance_at_sasknet.sk.ca (Francois Lachance) wrote:
>We have a few tables with numeric columns. By default, if you don't
>save a value in those columns, they are NULL values. Is there an
>advantage to leaving these empty rows as NULL? Users that are doing
>queries directly against the database are asking that Zero be put in
>the rows where no value has been specified. Programmers find it
>annoying to have to make sure that calculations are not done on NULL
>values since it returns a NULL if you do.
>
Most of the time, zero is preferred to null. BUT. But, sometimes it is important to know the difference between a VALUE of ZERO and a MISSING VALUE. This is when you need to use nulls to avoid giving the impression that a value is zero when it is actually unknown. For example, I have not told you my age; do you assume it is zero?

-- 


John P. Higgins

Database Services
Deere & Company                Internet: jh33378_at_deere.com
John Deere Road                   Phone: (309) 765-4481
Moline, IL 61265-8098               Fax: (309) 765-4128
Received on Wed Nov 29 1995 - 00:00:00 CET

Original text of this message