WITHeAS(SELECTROWNUMASsn,deptno,mgr,jobFROMv) SELECTdeptno FROM ( SELECTsn,deptnoFROMeWHEREmgr=7779 UNION SELECTsn,deptnoFROMeWHEREjob='JOBNAME' ) ORDERBY1;
WITHeAS(SELECTROWNUMASsn,deptno,mgr,jobFROMv) SELECTdeptno FROM ( SELECTsn,deptnoFROMeWHEREmgr=7779 UNION SELECTsn,deptnoFROMeWHEREjob='JOBNAME' ) ORDERBY1;