日期:2014-05-16  浏览次数:20690 次

mysql混合排序
表a 
id name
1 dddd 
2 eee
3 45
4 as
5 cx 
6 12 
7 cc
8 qq
9 vc
要求 name按数字先排序 字母后排
数字>字母>汉字>其它文字
直接用select * from a order by name asc
貌似不行

------解决方案--------------------
select * from a where name=数字
union all
select * from a where name=字母
union all
select * from a where name=汉字
------解决方案--------------------
探讨
select * from a where name=数字
union all
select * from a where name=字母
union all
select * from a where name=汉字