mysql按照指定的字段中某些字符串进行排序

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_15061629/article/details/80441128
SELECT * FROM t_role ORDER BY case
WHEN role_name like '%管理员%' then 4
WHEN role_name like '%经办员%' then 2
WHEN role_name like '%复核员%' then 3
end
asc

猜你喜欢

转载自blog.csdn.net/qq_15061629/article/details/80441128
今日推荐