SQL排序(规则12304)
现有数字型字段
order by shu desc 会排序为4321
我想排成12304不知可不可以?
[解决办法]
--指定值来排序
order by case when shu =0 then 4 when shu=4 then 5 else shu end asc
发布时间: 2012-02-12 17:16:34 作者: rapoo
SQL排序(规则12304)
现有数字型字段
order by shu desc 会排序为4321
我想排成12304不知可不可以?
[解决办法]
--指定值来排序
order by case when shu =0 then 4 when shu=4 then 5 else shu end asc