add column with default value mysql code example
Example 1: mysql add column default value
ALTER TABLE table1 ADD COLUMN foo INT DEFAULT 0;
Example 2: altering the column name in MySQL to have a default value
ALTER TABLE table_name ALTER COLUMN column_name SET DEFAULT 'literal';