13 May 2018        Add to Favorites   Report

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. 


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

Copied