Don't Use Nested IFNULL, Use COALESCE - MySQL16 Jun 2013 If you're looking for how to do a nested IFNULL, you probably need to be looking at how to use COALESCE instead. It returns the first non-null item in a list.Example:SELECT COALESCE(NULL,1);Returns 1