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: To make a copy of a table

Re: To make a copy of a table

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 1998/01/12
Message-ID: <69cdat$290$1@hermes.is.co.za>#1/1

Mabel wrote in message <01bd1e32$82aa7850$570bbac3_at_m3bj1>...
>> I tried to do this:
>> create table T2 as select * from T1 order by colX;
>> This does not work...
>
>I do not understand why you need to do this, but anyway create a PL/SQL
>with a cursor

<snip>

Bad idea IMHO to copy tables using a transaction-based copy method. Maybe not if the the tables are small, but then I haven't seen small tables for a quite a while now. ;-)

I suggest that the UNRECOVERABLE option be used with the CREATE TABLE AS SELECT. And unfortunately the ORDER BY can not be used to physically order the data in the new table.

Another option is to use the SQL*PLUS COPY TABLE command, and I recall an Oracle expert telling me that it can be used to physical ordering of data, but I have never tried it.

regards,
Billy Received on Mon Jan 12 1998 - 00:00:00 CST

Original text of this message

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