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: Novice to Oracle

Re: Novice to Oracle

From: T. Schwickert <schwickert_at_yahoo.com>
Date: 6 Aug 2001 02:55:30 -0700
Message-ID: <5fcc15a8.0108060155.3715d3c5@posting.google.com>

"Jordan" <mj_at_nba.com> wrote in message news:<9kjle4$8bi1_at_imsp212.netvigator.com>...
> Hi, I want to know how to rename the column name in a table, thanks..

Hi Jordan,

you can't rename a column.
However, you could add a column, update this column with the old values and drop the old column.
i.e

alter table xxx add (newcol columntype); update table xxx set newcol=oldcol;
commit;
alter table xxx drop (oldcol);

for more information read the docu (Oracle 8i SQL Reference)

I', mot sure if this applies to older oracle-version than 8i too..

Hth
 Thomas Received on Mon Aug 06 2001 - 04:55:30 CDT

Original text of this message

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