Sunday, December 4, 2011

How to change column name of any table in Oracle

Sometimes we might need to change column name in table, to do so

alter table <table name> rename column <column name to be changed> to <desired column name>

For example if you want to change column name from D_ID to DEPT_ID of DEPARTMENT table

alter table DEPARTMENT rename column D_ID to DEPT_ID;