Re: Does Codd's view of a relational database differ from that of Date&Darwin? [M.Gittens]

From: mountain man <>
Date: Fri, 10 Jun 2005 01:00:16 GMT
Message-ID: <AC5qe.11727$>

"Jon Heggland" <> wrote in message
> In article <P0tpe.7445$>,
> says...
>> >>Not exactly: SQL ignores NULLs in aggregate functions (except
>> >>COUNT(*)).
>> >>It is not treated as zero for AVG, for instance. Also note that x +
>> >>NULL
>> >>evaluates to NULL; therefore, SQL's SUM is not iterated addition -- it
>> >>has a much more complicated definition.
>> >
>> > Thanks for the clarification.
>> On the contrary, the answer is wrong for the MS TSQL.
>> The AVG and SUM commands ignore nulls - they are
>> not treated as *anything*, which in fact, they're not.
> Isn't that what I said? "SQL ignores NULLs in aggregate functions
> (except COUNT(*))."

Yes, the first part of what you said was correct. My apologies for the confusion on the first part.

>> And x + NULL does not evaluate to NULL but x.
> I should have mentioned that I am talking about the SQL2 standard (or
> SQL/92 or SQL:1992 or SQL-92 or whatever it is called). I am not
> familiar with MS TSQL.

It appears to be an ISO/ANSI SQL standard. SQL-99:

Pete Brown
Falls Creek
Received on Fri Jun 10 2005 - 03:00:16 CEST

Original text of this message