Hi,

>   a) why is it like this? if its because of a standard, again why is the
> standard like that?

I don't know why, but this seems to be consistent across databases
(all databases I tested return NULL). By the way

DROP TABLE IF EXISTS x;
CREATE TABLE x (val INTEGER);
SELECT MIN(val), MAX(val), AVG(val) FROM x;

also returns NULL. Only COUNT() returns 0.

>   b) is there a way around this (other than 'isnull(sum(val),0)'  )?

I don't think there is a better solution.

>   c) maybe it should be in the docs about the function.

Yes, I will write: "If no rows are selected, the result is NULL."

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to