Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> renaming a column
DBS: Oracle 8.0.4
OS: Solaris 2.5.1
Hi All,
I'm trying to write a script to rename a column in a table. The following method seemed to work:
obj_num= select obj# from sys.obj$ where type#=2 and name=<old_name> and
owner# = <userid>;
update sys.col$ set name=<new_colname> where obj#=obj_num and
name=<old_colname>;
After running this and restarting the database, 'desc table' reflects the changes and DML commands seem to work normally. However when I try to create a new type in a PLSQL procedure with '%rowtype' syntax and access the new column names, I get an error saying invalid column name.
Is there something else that needs to be updated in addition to (or instead of) these tables?
Thanks,
pascal
Received on Thu Jun 10 1999 - 06:17:41 CDT