MySQL 使用order by 后怎么使用union?
套一层就可以了
select * from (select * from a where id <100) t1 union all (select * from a where id >100)
order by 做了排序,再union 排序乱了,这样内层的order by 就是没用的,所以还是外层做排序合适。