select id, name from regions order by field(id, 2, 3, 1); //推荐
select * from test where id in(3,1,5) order by find_in_set(id,'3,1,5');
select * from test where id in(3,1,5) order by substring_index('3,1,2',id,1);
暂无评论
select id, name from regions order by field(id, 2, 3, 1); //推荐
select * from test where id in(3,1,5) order by find_in_set(id,'3,1,5');
select * from test where id in(3,1,5) order by substring_index('3,1,2',id,1);