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...

Re: Insert from another table...

From: Vijay Vardhineni <vardhineni_at_worldnet.att.net>
Date: 1997/01/18
Message-ID: <01bc04f8$a9975900$846993cf@default>#1/1

You cannot use order by clause in a select statement that you want to use it with the insert. The order in which oracle retrieves records does not depend on the order in which you inserted. Even you sort your records while inserting, The ROWID's of these inserted records may not be in this order. While selecting data, Oracle will let you sort the records through its ORDER BY clause in the select statement.

-- 
Vijaya Kumar Vardhineni
Certified Oracle DBA, EDS
Plano, TX

L. Tseng <lesliet_at_u.washington.edu> wrote in article
<5bp2pv$n4l_at_nntp1.u.washington.edu>...

>
> 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
>
>
Received on Sat Jan 18 1997 - 00:00:00 CST

Original text of this message

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