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 -> Re: renaming a column

Re: renaming a column

From: Kevin A Lewis <KevinALewis_at_Hotmail.com>
Date: Thu, 10 Jun 1999 14:05:33 +0100
Message-ID: <vFO73.113287$pl3.58365@newreader.ukcore.bt.net>


You can only rename a clumn in a table from 8.1 or 8i

And this isn;t the way

--
Kevin A Lewis (BOCM PAULS LTD - Animal Feed Manufacturer - Ipswich England)

                        <KevinALewis_at_HotMail.com>

The views expressed herein by the author of this document are not necessarily those of BOCM PAULS Ltd. Pascal Byrne <pbyrne_at_ie.oracle.com> wrote in message news:375F9ED5.AE5D4618_at_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 - 08:05:33 CDT

Original text of this message

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