| 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]
Jon Heggland 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.
I'd suggest that SQL's SUM *should* be iterated addition. And that all aggregates should return NULL if any of the attributes in the aggregated column are NULL. Surely if any of them are unknown, we must say that the sum or average is unknown also?
What are the arguments for not doing this?
Paul. Received on Tue Jun 07 2005 - 09:49:47 CDT
![]() |
![]() |