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

Home -> Community -> Usenet -> c.d.o.tools -> Re: About ordering in SQL

Re: About ordering in SQL

From: jAnO! <j.j.groot_at_kpn.com>
Date: Thu, 7 Sep 2000 10:51:31 +0200
Message-ID: <8p7kul$e3n$1@hdxl22.telecom.ptt.nl>

Artti Jaakkola <ext-artti.jaakkola_at_nokia.com> wrote in message news:PyGt5.10147$oL4.210919_at_news2.nokia.com...
> If I make following query:
>
> SELECT
> ID
> FROM
> SOMETABLE
> WHERE
> ID IN (1, 4, 6, 2)
>
> ID
> --
> 2
> 6
> 4
> 1
>
> Is the result always ordered like this or is there some better way to do
 it?
>
> --
> - Artti -

use order by clause
> SELECT
> ID
> FROM
> SOMETABLE
> WHERE
> ID IN (1, 4, 6, 2)
> ORDER BY ID;
greet JAN

--
Disclaimer: This statement is not an official statement from, nor does it
represent an official position of K.P.N. Telecom bv.
Received on Thu Sep 07 2000 - 03:51:31 CDT

Original text of this message

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