How to rename a table column in Oracle 10g

Arvind Lairenjam picture Arvind Lairenjam · Dec 14, 2012 · Viewed 172.6k times · Source

I would like to know: How to rename a table column in Oracle 10g?

Answer

DazzaL picture DazzaL · Dec 14, 2012
SQL> create table a(id number);

Table created.

SQL> alter table a rename column id to new_id;

Table altered.

SQL> desc a
 Name                                      Null?    Type
 ----------------------------------------- -------- -----------
 NEW_ID                                             NUMBER