| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate& Darwin? [M.Gittens]
In article <42a591c4$0$41901$ed2619ec_at_ptn-nntp-reader03.plus.net>,
paul_at_test.com says...
> Alfredo Novoa wrote:
> >>Why not say then that all aggregates that involve a NULL return NULL?
> >
> > This is what SQL does. Sometimes we want to get a value but we get a
> > null instead.
>
> Are you sure? I've just tried summing a column that contains a NULL in
> PostgreSQL and it doesn't return NULL - it treats the NULLs as zeros.
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.
-- JonReceived on Tue Jun 07 2005 - 08:07:09 CDT
![]() |
![]() |