The WITH clause may be processed as an inline view or resolved as a temporary table. The WITH clause, or subquery factoring clause, is part of the SQL-99 standard and was added into the Oracle SQL syntax in Oracle 9.2. Insert into dept values (40,'OPERATIONS','BOSTON') Insert into dept values (30,'SALES','CHICAGO') Insert into dept values (20,'RESEARCH','DALLAS') Insert into dept values (10,'ACCOUNTING','NEW YORK') The examples below use the following tables.ĭeptno number(2) constraint pk_dept primary key,Įmpno number(4) constraint pk_emp primary key,ĭeptno number(2) constraint fk_deptno references dept Recursive Subquery Factoring : Hierarchical Queries Using Recursive WITH Clauses.WITH Clause Enhancements in Oracle Database 12c Release 1 (12cR1).WITH Clause : PL/SQL Declaration Section.Home » Articles » Misc » Here WITH Clause : Subquery Factoring in Oracle