12 May 2018        Add to Favorites   Report

Adding column to a table in Teradata

To add a new column to an existing table i n Teradata without dropping it, we can make use of the alter table command

Syntax:

ALTER TABLE Table_name ADD column_name datatype


Example:

ALTER TABLE HAPPY_EMPLOYEES ADD HOBBIES VARCHAR(255) ;
ALTER TABLE HAPPY_EMPLOYEES ADD HOBBIES VARCHAR(255)  NOT NULL DEFAULT 'DAY DREAMING';

Read great educational content like this and a lot more ! Create my free account now 🎁

Copied