Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can I rename a colum name w/oracle 8i?
Connor McDonald wrote:
>
> Mark Townsend wrote:
> >
> > ould_at_my-deja.com wrote:
> > >
> > > Yes it is possible.
> > >
> > > Ould
> > > In article <38314958.489F2C8F_at_somm.com>,
> > > mark_at_somm.com wrote:
> > > >
<snip>
> > > > Doesn't seem that I can alter the name of a colum that I created?..
> > > > thanks.
> > Oracle8i added the ability to drop a column from a table. However, there
> > is no single command (yet) to rename a column. Instead you could look at
> > one of the following:
> >
> > 1) DROP the offending column from the table and ADD the newly named one
> > - if the column is empty
> > 2) Use CREATE TABLE AS SELECT to re-create the table with a new column
> > name if the column is not empty - you will need to rename the table
> > after dropping the original and also rebuild any indexes, constraints
> > etc
> > 3) Look at Oracle Change Management Pack, which will do both of the
> > above for you automagically
<snip>
> Or just rename the table and create a view with the original name (with
> the column renamed)
Doh !
--
Regards,
Mark Townsend
Senior Product Manager Ph: (650) 633 5764 Server Division Fx: (650) 506 7222 Oracle Corporation Email: mtownsen_at_us.oracle.comReceived on Tue Nov 16 1999 - 12:56:51 CST