[snip] Is there any way to make sum() return "0" instead of "NULL" when one or more of the rows being sum()'d is null?
Phrased another way, is there a way to make mySQL treat "NULL" as "0" when dealing with mathematical functions? [/snip] Use an IF... SELECT SUM(IF(myColumn IS NULL, 0, myColumn)) AS myTotal FROM myTable -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]