SELECT
    CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,
           ' MODIFY ', COLUMN_NAME, ' ', COLUMN_TYPE,
           ' NOT NULL DEFAULT 0;') AS query_di_correzione
FROM
    INFORMATION_SCHEMA.COLUMNS
WHERE
    TABLE_SCHEMA = 'eqn_prod'
    AND DATA_TYPE IN ('int', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal')
    AND IS_NULLABLE = 'NO'
    AND COLUMN_DEFAULT IS NULL
    AND EXTRA NOT LIKE '%auto_increment%';