mysql混同排序

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=汉字

mysql混同排序

相关文章:

你感兴趣的文章:

标签云: