Subject | Count(id) returns null. although count should never return null... |
---|---|
Author | asakin312 |
Post date | 2005-09-06T17:14:58Z |
Hi,
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.
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?
Thanks,
Ariel.
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.
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?
Thanks,
Ariel.