how to make null a integer mysql code example Example: mariadb cast null to 0 SELECT COALESCE(col, 0) FROM `table`;