MySQL Forums
Forum List  »  Newbie

Sort by a givin siquence in "WHERE" clause?
Posted by: V@no
Date: July 26, 2005 06:33PM

Hi!
I'm trying to get SELECT results in the same order as it was given in "WHERE".
for example:

SELECT id FROM tablename WHERE id IN (2,3,1,4)

The siquence I'd like to receive the result should be: 2, 3, 1, 4
As of now it would receive in 1, 2, 3, 4 (the siqence of the entries in the database)

can someone help me?

Thanks.

V@no

http://gallery.vano.org

Options: ReplyQuote


Subject
Written By
Posted
Sort by a givin siquence in "WHERE" clause?
July 26, 2005 06:33PM


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.