The ADD function has options for the new column name, data type, the size and the scale of the new type, whether or not the new column should allow null values, and whether or not the new column has a default value associated with it.
Syntax:
- ALTER TABLE tbl_name ADD column_name datatype
Examples:
- ALTER TABLE tbl_employee ADD native_place CHAR(25) ;
- ALTER TABLE tbl_employee ADD native_place CHAR(25) DEFAULT 'Mumbai' ;
- ALTER TABLE tbl_employee ADD native_place CHAR(25) NOT NULL;