## Try using EXISTS in place of DISTINCT


   SELECT DISTINCT DEPT_NO, DEPT_NAME
   FROM   DEPT D,
          EMP E
   WHERE  D.DEPT_NO = E.DEPT_NO ;



   SELECT DEPT_NO, DEPT_NAME
   FROM   DEPT D
   WHERE  EXISTS ( SELECT 'X'
                   FROM   EMP E
                   WHERE  E.DEPT_NO = D.DEPT_NO );
