您的位置:首页技术文章
文章详情页

mysql字符串排序问题

浏览:39日期:2022-06-17 17:55:18

问题描述

问题解答

回答1:

第一种:select * from qx_cate order by id desc;第二种:select from qx_cate where id != 16 union all select from qx_cate where id = 16;

回答2:

order by cast(replace(path, ’,’, ’’) as unsigned integer)

需要注意 path 超出 int 范围的情况, 或者另寻他法

回答3:

因为path是按Alphabetical Sorting做的题主要的是Natural Sorting 网上有相关的解决办法可以自己找一下

相关文章: