Change collumn name [message #371631] |
Thu, 16 November 2000 21:28 |
tarun
Messages: 13 Registered: November 2000
|
Junior Member |
|
|
Anyone know whether it is possible to change column names in Oracle 8i.
thanks
Tarun
|
|
|
Re: Change collumn name [message #371657 is a reply to message #371631] |
Mon, 20 November 2000 14:08 |
John Dorlon
Messages: 3 Registered: November 2000
|
Junior Member |
|
|
There is no one-line command to do this, but if you don't mind having your column in a different position you can do in a series of SQL statements like this :
alter table {tablename} add ({new column name});
update {tablename} set {new column name} = {old column name};
alter table {tablename} drop column {old column name};
In older versions of Oracle, you have to rebuild your table to get a new column name.
|
|
|