Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: RE-NAMING A COL.
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 worseReceived on Sun Apr 23 2000 - 00:00:00 CDT
![]() |
![]() |