13 May 2018 · n-pacha ·       Add to Favorites   Report

Rename a column in Teradata

to change column name in a table,

Syntax:

ALTER TABLE mytbl RENAME COLUMN oldname TO newname;

Example:

ALTER TABLE Emp RENAME COLUMN Name TO First_Name;
  • However there are restrictions, like you can't rename a column if it's part of an index (for Primary Index you will have to drop and recreate the table, for SI, drop indexes and then rename, create the SI again)

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