This is an old revision of the document!
$IFNULL specifies a return value for columns that contain null values. The column data type and the return value data type must match.
If column-value is NULL then return specified-value, else return column-value
Use of this function could change the results of a calculated average. A true NULL is generally not included in a count and thus not included in an average. A NULL altered with this function will be included in the count and the average.
$IFNULL(column_spec, specified-value)
Required. Column name that might contain a null value.
Required. The value to return if the column value is null. This value must be of the same data type as the column.
SELECT company, $IFNULL(contact, 'No contact') FROM customers WHERE state = 'ca'