order by question

From: Tony Liao <tonyliao(at)yuehetone(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: order by question
Date: 2009-06-19 09:50:25
Message-ID: 8f750b7c0906190250p854581en365005b49019912d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,All
for example,I have a query as this
select id,product_id from table_name where product_id in
(6,3,4,10,7) order by .....
the results I want to get as bellow:
id................product_id......................
33...............6...................................
40...............6..................................
12...............3....................................
25...............4.................................
10...............4................................
17...............10.................................
43................7...................................

any Idea? thanks

--
Tony Liao

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tino Schwarze 2009-06-19 12:10:13 Re: order by question
Previous Message Marcin Stępnicki 2009-06-18 14:01:58 Re: ruby connect