selecting data from subquery in same order

From: mark <markkicks(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: selecting data from subquery in same order
Date: 2008-08-17 00:11:36
Message-ID: 82fa9e310808161711l7d1e2b88uc09006a2065a1247@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi
if i execute this statement:

select * from users where id in (2341548, 2325251, 2333130, 2015421,
2073536, 2252374, 2273219, 2350850, 2367318, 2032977, 2032849, )

the order of rows obtained is random.

is there anyway i can get the rows in the same order as the ids in
subquery? or is there a different statement i can use?
thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-08-17 01:14:17 Re: Confronting the maximum column limitation
Previous Message Decibel! 2008-08-16 19:31:29 Re: Changing between ORDER BY DESC and ORDER BY ASC