COALESCE accepts one
or more SQL expressions of the same data type. The COALESCE expression
checks the value of each SQL expression in the order in which it is e listed and returns
the first non-null value. If only one SQL expression is listed, the
COALESCE expression returns the value of that SQL expression. If all
the values of all arguments are null, the COALESCE expression returns
a null value.
In some SQL DBMSs, the
COALESCE expression is called the IFNULL expression.
Note: If your query contains a
large number of COALESCE expressions, it might be more efficient to
use a natural join instead.
For more information,
see Natural Joins.