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

Home -> Community -> Usenet -> c.d.o.server -> Re: Insert from another table...Create with ORDER BY

Re: Insert from another table...Create with ORDER BY

From: Tomm Carr <tommcatt_at_geocities.com>
Date: 1997/08/15
Message-ID: <33F481A3.2A68@geocities.com>#1/1

eberry_at_dstcorp.com wrote:
>
> Orcale does not take ORDER BY clause in the following insert
> syntax. Do you know why? Any suggestion on workaround?
> Thanks,
> Leslie
>
> insert into table_a (col1, col2,col3)
> select x, y, z from table_b
> order by x

Oracle is a *relational* dbms, and remember one of the characteristics of a relational database is the ordering of the tuples is not significant. Oracle does not allow the ORDER BY in the insert statement because it is meaningless. If you will be accessing the data ordered by -- apparently -- col1, then create an index on col1.

-- 
Tomm Carr
---- ----
Hunting for a job is like hunting for an elephant.
If you're not *very* careful, you might find one!
Received on Fri Aug 15 1997 - 00:00:00 CDT

Original text of this message

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