Rename a column in Teradata
to change column name in a table,
ALTER TABLE mytbl RENAME COLUMN oldname TO newname;
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 !
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