Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> R: [beginner] Changing column name and type without losing content
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