Mysql order by varchar类型数字
SELECT * FROM testTable where fcode=40006 and fmotype='bu100101' order by fvalue desc limit 0,10
出现下面情况:
12
14
1566
16
2425
25
27
修改成下面形式就是按照大小降序排列了:
SELECT * FROM testTable where fcode=40006 and fmotype='bu100101' order by fvalue+0 desc limit 0,10
+0之后 就转化成INT 类型排序了
- 下一篇: PECL 和 PEAR
- 上一篇: 优化curl并发使用
相关推荐
- apache与nginx实现原理对比
- Posted on 05月13日
- PHP异常详解
- Posted on 03月03日
- 如何成为一位卓越的技术经理?
- Posted on 05月17日
- 基于微信抽奖
- Posted on 06月25日