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: Renaming a Table field...

Re: Renaming a Table field...

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/12/27
Message-ID: <5a0gk8$r6j@newton.pacific.net.sg>#1/1

Zoaib Saifuddin <Zoaib.Saifuddin_at_ubs.com> wrote:
>Hello everyone,
>
>Can anyone pl. suggest a method to modify/rename a column in ORACLE table
>which contains data. Note that the table has one of the fields of
>datatype LONG.
>
>Thanks in advance.
>
>Cheers
> - Zoaib.

Hi there,

Try the following.

  1. rename current table to old.
  2. create new table with the columns required.
  3. Write an PL/SQL procedure which will extract fields from old and insert them into new.

I don't think you can use the following statement

create table new as select (x,y,z from old);

The above will fail because table old has got a long column.

Hope the above helps you

Regards

N.Prabhakar Received on Fri Dec 27 1996 - 00:00:00 CST

Original text of this message

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