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 -> R: [beginner] Changing column name and type without losing content

R: [beginner] Changing column name and type without losing content

From: Francesco Marchioni <Francesco.Marchioni_at_lastminutetour.com>
Date: Thu, 2 Nov 2000 09:56:37 +0100
Message-ID: <8tr9ta$558$1@marte.lastminutetour.com>

Ok. Thanks for your replies- sorry if my post caused some "mess" between two members of this newsgroup. Now I know that is actually possible to change column name (thanks oracle4444)
And I know that it's not adviced to do it, (thanks David)

Now you can give your hand and make peace! :)

Francesco Marchioni
java Developer
<ashish25_at_my-deja.com> wrote in message 8tk11v$hbr$1_at_nnrp1.deja.com...
> This should work if you are using Oracle 8i.
> Just add a new column in your table with new name and new width.
> Alter table orig_table add new_column NUMBER(10);
> Update orig_table set new_column=old_column;
> commit;
> alter table orig_table drop old_column;
>
>
> In article <8t6rkg$vrg$1_at_marte.lastminutetour.com>,
> "Francesco Marchioni" <Francesco.Marchioni_at_lastminutetour.com> wrote:
> > Hello,
> > I have a column in my DB which is a number(2). Now my doubt is:
> > Can I change column name & width ( to number (10) )
> > without having to drop the column and build a new one ?
> > In fact I'd like to save the data which is in the column.
> > Thanks
> > Francesco
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Nov 02 2000 - 02:56:37 CST

Original text of this message

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