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: Can I rename a colum name w/oracle 8i?

Re: Can I rename a colum name w/oracle 8i?

From: Mark Townsend <mtownsen_at_us.oracle.com>
Date: Tue, 16 Nov 1999 10:56:51 -0800
Message-ID: <3831A8F3.839DD053@us.oracle.com>


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.com

Received on Tue Nov 16 1999 - 12:56:51 CST

Original text of this message

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