The IFNULL function
The IFNULL()
function returns the first of the two indicated values if the data value found in the table is not null, and returns the second value if there is a null value.
The syntax for the if null function in [[The SELECT statement]] is:
SELECT IFNULL(column_name, replacement_value)
FROM table_name
WHERE condition;