IFNULL(exp1, exp2)

If exp1 is null, exp2 is returned, otherwise exp1 is returned. The possible data type or types of exp1 must be compatible with the data type of exp2.

 

Example:

SELECT IFNULL(123, 456) returns 123