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)

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