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 09:06:12 -0800
Message-ID: <38318F04.3CC320B1@us.oracle.com>


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

Received on Tue Nov 16 1999 - 11:06:12 CST

Original text of this message

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