表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
貌似不行

解决方案 »

  1.   

    select  * from a where name=数字
    union all
    select  * from a where name=字母
    union all
    select * from a where name=汉字
      

  2.   

    二楼的方法不会是吧所有的数字 字母 汉字都列一遍吧 数据有很多的啊
    mysql不认识汉字啊
      

  3.   

    SELECT * 
    FROM `customer` 
    WHERE ascii( name ) <58 and ascii(name)>47 
    union all
    SELECT * 
    FROM `customer` 
    WHERE ascii( name ) <123 and ascii(name)>64 order by name asc
    这是我写的 有点笨啊