13 May 2018 · n-pacha ·       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. 

n-pacha

posted on 13 May 2018

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied