Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> renaming a column

renaming a column

From: Pascal Byrne <pbyrne_at_ie.oracle.com>
Date: Thu, 10 Jun 1999 12:17:41 +0100
Message-ID: <375F9ED5.AE5D4618@ie.oracle.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US