Victor Pendleton wrote:
This is the way the SUM() operator works. If there are not any rows it will
return NULL.
http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html
Thanks! But I found , that it returns null only from version 3.23, in
the earlier versions it was 0.
The query: SELECT e.id, sum(c.quantity) FROM Execution e left join
Couple c on c.executionRef=e.id GROUP BY e.id;
So I think it's a special query that returns 0 in version 3.23.51
because of bad implementation.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]