关于表连接如(union join)中使用order limit 

Eg: select 1 order by 1 union select 2 order by 1

Incorrect usage of UNION and ORDER BY

正确使用方法

(select 1 order by 1 limit 1) union (select 2 order by 2) order by 1

Incorrect usage of UNION and ORDER BY

对各个结果集排序

 

相关文章: