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: Hrdlicka Jan <hrd_at_dcit.cz>
Date: 1998/01/08
Message-ID: <01bd1c7d$4f969400$27866cc2@h-h.sh.cvut.cz>#1/1

Brad Murray <BradMurray_at_SeeSignatureIfThere.com> pí¹e v èlánku

<MPG.f1ef30b87e0a7659898a9_at_news>...

> In article <693393$5i6$1_at_naiad.grenet.fr>, cicg_at_cicg-
> communication.grenet.fr said...
> > 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...
>
> This is a table. The order of the rows is not really important. If you
> need the new table to be ordered for subsequent queries you will need to
> put an order by clause in those queries. Oracle doesn't allow you to put
 

> an order by clause in a create table as statement for this reason.

Oracle does. You can define table with CLUSTER option. Then rows in table are physically sorted (of course if it isn't hash CLUSTER). But I agree
with you that it is not solution or 693..'s problem.

>
> Think about it this way. You create your table this way so that you
 don't
> have to order it in future use. Then somebody adds a row. It will
> probably now be out of order.

But in that case all rows will be in order.

Jan Hrdlicka
DCIT Czech republic Received on Thu Jan 08 1998 - 00:00:00 CST

Original text of this message

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