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

Home -> Community -> Usenet -> c.d.o.tools -> Re: RE-NAMING A COL.

Re: RE-NAMING A COL.

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/04/23
Message-ID: <3902D926.2D01@yahoo.com>#1/1

Steve A wrote:
>
> Hi,
>
> thanks for not reading my original posting, before giving me this gem.
>
> Pavel Drs <pavel.drs_at_anfdata.cz> wrote:
>
> > SQL> create table dummy (a number, b number);
> >
> > Table created.
> >
> > real: 721
> > SQL> alter table dummy drop column a;
> >
> > Table altered.
> >
> > real: 1602
> > SQL> desc dummy;
> > Name Null? Type
> > ------------------------------- -------- ----
> > B NUMBER
> >
> > SQL>
> >
> >
> >
> >
> > --
> > pavel.drs_at_anfdata.cz
> >
> > Steve A <steve_at_micromark.com.cn> pí'e v diskusním
> > pøíspìvku:1e98dp4.1j4xzh2rxwp54N%steve_at_micromark.com.cn...
> > > Hi,
> > > is it possible to rename a col in oracle 8.1.5
> > >
> > > I have a table with some dead col's in, and would like to re-use them.
> > >
> > > I cannot just drop the col, because I use a select into array in my
> > > client application,so if I drop the col, then all my arrays will go out
> > > of sync, I also like my col names to make sense.
> > >
> > >
> > >
> > > It seems such a simple process, but i cannot find anything in the docs
> > > about it.
> > >
> > > steve
> > >
> > >
> > >
> > >
> > >

Easy way - rename the table to another name and create a view (with the new column name) with the original table name.

Hard way - hack in COL$ and look about in (I think) IB1 and IB2 to remove appropriate lines and recompile any PL/SQL that used the table.

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Sun Apr 23 2000 - 00:00:00 CDT

Original text of this message

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