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: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 16 Nov 1999 18:43:09 +0800
Message-ID: <3831353D.156E@yahoo.com>


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:
> > >
> > > I installed the Linux version of Oracle 8i.
> > >
> > > Doesn't seem that I can alter the name of a colum that I created?..
> > > thanks.
> > >
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> 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
> --
> Regards,
>
> Mark Townsend
>
> Senior Product Manager Ph: (650) 633 5764
> Server Division Fx: (650) 506 7222
> Oracle Corporation Email: mtownsen_at_us.oracle.com
>
> ---------------------------------------------------------------
>
> Name: mtownsen.vcf
> Part 1.2 Type: text/x-vcard
> Encoding: 7bit
> Description: Card for Mark Townsend

Or just rename the table and create a view with the original name (with the column renamed)
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Tue Nov 16 1999 - 04:43:09 CST

Original text of this message

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