UNION ALL和ORDER BY 的搭配使用注意事项
一.先连接后排序1.连接排序时,无论有多少个union/union all的部分,只有最后一个union/union all部分才能拥有一个order by子句2.union/union all的order by子句只能通过列号或别名来标示你要排序的字段例: select t1.account_id account_id,t1.account_name account_name fro...
原创
2014-06-27 11:03:49 ·
3564 阅读 ·
1 评论