On Thu, Oct 28, 2004 at 11:50:12AM +0200, Jigal van Hemert wrote: ... > Fortunately there is function COALESCE() that will return the first argument > that is not NULL. In case of NULL values you can use a default value for an > expression: COALESCE( `col`*2, 14) will produce 14 if `col` is NULL.
FWIW, IFNULL() does the same thing, with a clearer (to me) name, e.g., IFNULL(sum(qty), 0). --Pete -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]