我需要使用oracle来限制union查询的结果:
Select
...
Union
Select
...
Run Code Online (Sandbox Code Playgroud)
我需要将其限制为前500个结果,但不使用"with".
任何想法?谢谢?
此查询将从您的联合查询中选择500条记录:
select *
from ( select
...
union
select
...
)
where rownum <= 500
Run Code Online (Sandbox Code Playgroud)