Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: copy data to a new table

Re: copy data to a new table

From: Charles S. Small, Jr. <csmall_at_mail.tqci.net>
Date: Sat, 15 Aug 1998 22:09:03 -0400
Message-ID: <35D63F3F.ED69972B@mail.tqci.net>


I used a cursor loop...

    declare

       cursor CUR1 is
           select * from table1;
    begin
       for CUR1_REC in CUR1
         loop
           insert into table2 values
           (CUR1_REC.col1,
            CUR1_REC.col2,
            CUR1_REC.col3,
             etc. );
         end loop;

   end;

It seemed to work.

              Charles

Margaret Burwell wrote:

> I want to copy all the data in table1 to an identical table called table2.
> One of the columns is datatype LONG. I have tried
>
> create table table2 as select * from table1 ;
>
> and creating the table and then
>
> insert into table2 (select * from table1);
>
> Both of these give me ORA-00997: illegal use of LONG datatype. Does
> anyone have any suggestions?
>
> Marg
Received on Sat Aug 15 1998 - 21:09:03 CDT

Original text of this message

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