13 May 2018        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)

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

Copied