【MySQL】查询保持IN中的顺序

 举例:

Select * from `user` where 
user_id in (123,
124,2245,777,89,90)

order by field (user_id, 123,
124,2245,777,89,90);

order by field ()

你可能感兴趣的:(sql,数据库)