//需要先转换成数字再进行排序 1.直接用加法 字符串+0 eg: select * from orders order by (mark+0) desc 2.使用函数 CAST(value as type); CONVERT(value, type); 注: 这里的type可以为: 浮点数 : DECIMAL 整数 : SIGNED 无符号整数 : UNSIGNED
//需要先转换成数字再进行排序 1.直接用加法 字符串+0 eg: select * from orders order by (mark+0) desc 2.使用函数 CAST(value as type); CONVERT(value, type); 注: 这里的type可以为: 浮点数 : DECIMAL 整数 : SIGNED 无符号整数 : UNSIGNED
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。