SELECT a.empno FROM dept b, emp a, salgrade c WHERE EXISTS (SELECT a.empno FROM dept b, emp a, salgrade c WHERE a.deptno=b.deptno AND a.job <> 'CLERK' AND a.sal BETWEEN c.losal AND c.hisal) AND a.deptno=b.deptno AND a.job <> 'CLERK' AND a.sal between losal and hisal;
OPTIMIZER_GOAL is set to RULE.
Query Without Hints ===================
The execution path for this query without the use of any hints...:
little mistake step 1: dept full scan step 2: sort step 3: emp full scan step 4: salgrade full scan step 5: Nest loop from step3 and step4 step 6: sort step 7: Merge join from step2 and step6 ...