Teradata ALTER TABLE ADD COLUMN statement adds a new column to an existing Teradata table without dropping it. Apart from adding a new column, the ADD
function has the capabilities to add data types, size, where or not the new column should allow NULL
values, and where or not the new column has a default value associated with it.
Teradata ALTER TABLE ADD COLUMN Syntax
The syntax of Teradata ALTER TABLE ADD COLUMN is as below.
ALTER TABLE database_name.tbl_name ADD column_name datatype;
Teradata ALTER TABLE ADD COLUMN Example
Below are the examples of Teradata ALTER TABLE ADD COLUMN.
ALTER TABLE Teradatapoint.employee ADD hobbies varchar(50); ALTER TABLE Teradatapoint.employee ADD hobbies varchar(50) DEFAULT 'Listen to Music'; ALTER TABLE Teradatapoint.employee ADD native_place varchar(50) NOT NULL;