一个varchar 的字段 存放 1,2 11等
将字段*1或者+0可以将MySQL字符串字段按数值排序
select * from table where 1 order by id+0 desc;
select * from table where 1 order by id*1 desc;
对于mysql中字符串的排序
阅读 130
2022-11-07
一个varchar 的字段 存放 1,2 11等
将字段*1或者+0可以将MySQL字符串字段按数值排序
select * from table where 1 order by id+0 desc;
select * from table where 1 order by id*1 desc;
相关推荐
精彩评论(0)