WITH a AS (SELECT*FROM scott.emp), b AS (SELECT*FROM scott.dept) SELECT a.deptno, b.dname, a.empno, a.ename FROM a, b WHERE a.deptno = b.deptno ORDERBY a.deptno, a.empno;
下面是一个示例语句:WITH a AS (SELECT * FROM scott.emp), b AS (SELECT * FROM scott.dept) SELECT a.deptno, b.dname, a.empno, a.ename FROM a, b WHERE a.deptno = b.deptno ORDER B