请问对于union的结果集要如何排序?
假设a和b是结构相同的两张表现在
(select * from a order by a.seq ) union (select * from b order by b.seq)
这句话是有语法错误的
尝试
select c.* from ((select * from a) union (select * from b)) c order by c.seq
仍然有语法错误
但这两句在oracle和mysql下面运行一点问题都没有
哪位高手有解决方法,在此谢过 已经解决了
(select * from a ) union (select * from b ) order by seq
就可以了
页:
[1]