I am looking for the syntax to add a column to a MySQL database with a default value of 0
I am looking for the syntax to add a column to a MySQL database with a default value of 0
This will work for ENUM type as default value
ALTER TABLE engagete_st.holidays add column `STATUS` ENUM('A', 'D') default 'A' AFTER `H_TYPE`;
Another useful keyword is FIRST and AFTER if you want to add it in a specific spot in your table.
ALTER TABLE `table1` ADD COLUMN `foo` AFTER `bar` INT DEFAULT 0;