MySQL Forums
Forum List  »  Newbie

Simple sql question
Posted by: poker king
Date: December 22, 2008 06:57PM

I need to get un sorted records from sql...

here is an example

Select * from users where users.user_id IN ( 10 , 4 ,2 , 5 , 9)

I want the result in the same order...how do i do that?.

At present i get the results in 2,4,5,9,10...

It messes up... Only way is select one by one... anyone have ideas?.

Thanks in advance.



Edited 1 time(s). Last edit at 12/22/2008 06:59PM by poker king.

Options: ReplyQuote


Subject
Written By
Posted
Simple sql question
December 22, 2008 06:57PM
December 22, 2008 07:06PM
December 22, 2008 07:21PM
December 22, 2008 08:05PM
December 22, 2008 09:56PM


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.