mysql add column default null code example
Example 1: mysql add column default value
ALTER TABLE table1 ADD COLUMN foo INT DEFAULT 0;
Example 2: add new column not null sql server
ALTER TABLE MY_TABLE
ADD STAGE INT NOT NULL
DEFAULT '0';
Example 3: mysql select default if null
IFNULL(MAX(EMAIL), "[email protected]") as email