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: What is the order of query result by default ?

Re: What is the order of query result by default ?

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 6 Sep 2006 18:55:45 +0200
Message-ID: <44fefd90$0$31347$626a54ce@news.free.fr>

<krislioe_at_gmail.com> a écrit dans le message de news: 1157559867.458896.14820_at_d34g2000cwd.googlegroups.com...
| Hi All,
|
| If I do : select * from myTable, is it guaranteed that the query
| resultset is always the order when the data is inserted into the table
| ?
| For example :
|
| create table myTable(col1 varchar(2) primary key)
|
| Insert into mtTable values('x4')
| Insert into mtTable values('x3')
| Insert into mtTable values('x1')
| Insert into mtTable values('x2')
|
| select * from myTable // without any where condition.
|
| then the query result is ALWAYS :
| x4
| x3
| x1
| x2
|
| Thank you ,
| xtanto
|

The *only* way to have an order is to give an ORDER BY clause. Moreover, "inserted" order is meaningless in a multiuser environment.

Regards
Michel Cadot Received on Wed Sep 06 2006 - 11:55:45 CDT

Original text of this message

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