MySQL运行中,查询结果按照inset的顺序显示复制代码代码如下:select*fromtestwhereidin(3,1,5)按find_in_set(id,'3,1,5')排序;select*fromtestwhereidin(3,1,5)orderbysubstring_index('3,1,2',id,1);

MySQL运行中,查询结果按照inset的顺序显示复制代码代码如下:select*fromtestwhereidin(3,1,5)按find_in_set(id,'3,1,5')排序;select*fromtestwhereidin(3,1,5)orderbysubstring_index('3,1,2',id,1);