sql ifnull code example
Example 1: if column value is null then in mysql
SELECT
contactname, IFNULL(bizphone, homephone) phone
FROM
contacts;
Example 2: mysql select default if null
IFNULL(MAX(EMAIL), "[email protected]") as email
SELECT
contactname, IFNULL(bizphone, homephone) phone
FROM
contacts;
IFNULL(MAX(EMAIL), "[email protected]") as email