db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Clausen ...@statsbiblioteket.dk>
Subject Re: Fwd: COUNT queries
Date Thu, 10 Nov 2005 15:23:44 GMT
On Thu, 2005-11-10 at 04:41, Jeffrey Lichtman wrote:
> >1) A null column is excluded from a COUNT( colName ) aggregate. This 
> >is described in the section 10.9 under General Rules 4a. The 
> >database is supposed to raise a warning: "warning--null value 
> >eliminated in set function"
> If you want to get the count including nulls, you can use COUNT(*), 
> which returns the number of rows in the set being aggregated (not the 
> number of values).

A side question:  Is this any faster than using COUNT( colName)?  Or
does COUNT() always entail something on the order of iterating through
all the results of the query?


View raw message