Is there something like common table expressions in PL / SQL?

I recently learned about CTE in SQL Server and am trying to use it in PL / SQL. I do not need its recursive advantages, however I would like to use it instead of creating a view and improving query performance. Just find some direction as to which code might be similar.

+5
source share
1 answer

In Oracle, this is called a factoring subquery, and it works the same as in SQL Server AFAIK:

with cte as (select * from emp)
select * from cte join dept on dept.deptno = cte.deptno;

See the SELECT documentation and find "factoring."

+11
source

All Articles