MySQL Forums
Forum List  »  PostgreSQL

Emulate mysql order by field
Posted by: andrea rossi
Date: December 08, 2006 04:04AM

Good Morning. Few days ago I started to use Postgres and I have a question. Is there a function to emulate Mysql order by field?

For example, If I have 4 records and i want them in the order 1,3,4,2, with mysql i write

select * from table order by field(id,1,3,4,2). How can I do the same thing with Postgres? Is it possible? Thanks to all.

Please forgive my poor english.

Options: ReplyQuote


Subject
Views
Written By
Posted
Emulate mysql order by field
16750
December 08, 2006 04:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.