MySQL order by the same order of values in IN clause

Viewed 1352

Here is the simple query with IN clause. But the problem is i need to get the output in the same order of the ids.

SELECT GROUP_CONCAT(username) as users FROM usertable WHERE usr_id IN (54,68,46)

For example if i pass 54,68,46 then the row with usr_id 54 should come first then 68 and then 46 should come. Is there any way to achieve this in MySQL?

3 Answers
Related