mariadb cast null to 0 code example Example: mariadb cast null to 0 SELECT COALESCE(col, 0) FROM `table`;