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: Peter Brenner <pbrenner_at_charlotte.infi.net>
Date: 1998/01/10
Message-ID: <34B7DCAC.4D480C38@charlotte.infi.net>#1/1

Mabel wrote:

> I do not understand why you need to do this, but anyway create a PL/SQL
> with a cursor
>
> CURSOR source_table IS
> SELECT * FROM t1
> ORDER BY colx;
> BEGIN
> FOR i IN source_table LOOP
> INSERT INTO t2
> (c1, c2, c3, bla, bla);
> END LOOP;
> END;
>
> Jean-Luc Demoisson <cicg_at_cicg-communication.grenet.fr> wrote in article
> <693393$5i6$1_at_naiad.grenet.fr>...
> > I want to make a copy of a table in alphabetical order.
> > I tried to do this:
> > create table T2 as select * from T1 order by colX;
> > This does not work...
> > Thanks for replies
> >
> > Jean_Luc demoisson
> > jld_at_grenet.fr
> >
> >
> >

Please be aware that Oracle does not guarantee the order in which data is selected unless you use an order by clause. Simple inserting data into a table in alphabetical order will not assure you that the records will be retrieved in that same order.

Peter Received on Sat Jan 10 1998 - 00:00:00 CST

Original text of this message

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