Re: Reduce the No. of Fields in a Oracle Table
Date: 1995/07/26
Message-ID: <DCBCy7.Cxs_at_carmen.logica.co.uk>#1/1
lorenzen_at_winternet.com (James Lorenzen) wrote:
>Vir Madhu (madhu2_at_ix.netcom.com) wrote:
>: We are re_writing a Oracle application and as a part of that, I have
>: to reduce no. of fields in the table( consisting of 85 fields ) by
>: eliminating 5 fields. I am writing a program in Pro*C that reads all
>: but those 5 fields and insert into a new table i.e., the new table will
>: have 80 fields. There are 1 million records in this table. I am new to
>: oracle application development and wondering if there is a Standard
>: Oracle Tool that does this. Any pointers from the knowledgeable netters
>: will be highly appreciated.
>: Thank you
>: Madhu.
>It would be much simpler to either create the new table, selecting all
>except the the five dropped columns.
> CREATE TABLE tablename AS SELECT [the 80 columns] FROM [source table]
>-- or -
> create the table and then insert into it:
> INSERT INTO tablename SELECT [the 80 columns] FROM [source table]
>HTH
> James