Change column datatype or length in Teradata

To Modify the a column type, length or format, we use ADD function in Teradata

Syntax:

ALTER TABLE Table_Name
ADD Existing_Column_Name New_Data_Type(New_Length)

Example:

Alter table tbl_employee
Add Last_Name varchar(1000);

With the alter table command you can only increase the length and cannot reduce it and it doesnt support all datatypes, for example varchar to int is not possible. 

nVector

posted on 13 May 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds