mysql if a column is null return 0 else 1 code example
Example: if column value is null then in mysql
SELECT
contactname, IFNULL(bizphone, homephone) phone
FROM
contacts;
SELECT
contactname, IFNULL(bizphone, homephone) phone
FROM
contacts;