On 2 Feb., 19:36, Mike Goodwin <[email protected]> wrote:
> It surprised me that the sum over 0 rows comes to null and not zero.

So what is the sum of "nothing"?

DROP TABLE IF EXISTS x;
CREATE TABLE x (val INTEGER);
INSERT INTO x values (null);
SELECT sum(val) FROM x;

also returns null.





--~--~---------~--~----~------------~-------~--~----~
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