SQL question..

From: "Alexis Maldonado" <amaldona(at)ctcd(dot)cc(dot)tx(dot)us>
To: <pgsql-general(at)postgresql(dot)org>
Subject: SQL question..
Date: 2002-04-17 16:50:56
Message-ID: 006d01c1e630$0b8356a0$14818b0a@ctcd.cc.tx.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I know this might be a dumb basic sql question but..

I have a query list of IDs ( 4,3,1,2,12,5,6,8,7,9,11)

I want to build a query that gets those IDs in the exact same order but when i do

Select * From Table
Where ID IN ( 4,3,1,2,12,5,6,8,7,9,11)

It gets all the IDs in random order..

how can i get them in the order listed?

Thanks,
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-04-17 16:51:01 Re: Large table update/vacuum PLEASE HELP!
Previous Message Matthew Stanfield 2002-04-17 16:41:24 Re: Incorrect password using pg_ctl