Subject Re: [firebird-support] Count(id) returns null. although count should never return null...
Author Ivan Prenosil
> I ran the following query on a regular table:
> SELECT count(id) FROM FILES WHERE 0=1 group by id
> and I got NULL as an answer.

Are you sure ? It should not return NULL but empty result.


Ivan


>
> The following query works ok and returns 0:
> SELECT count(id) FROM FILES WHERE 0=1
> (same as the above only without the group by).
>
> Is this the correct behavior?
> How can I get 0 as an answer from the first query?