mariadb cast null to 0
snippet in sql

mariadb cast null to 0

user1083

SELECT COALESCE(col, 0) FROM `table`;