Re: How do you find the "unmatched" fields in a join
Date: 8 Jun 2001 13:30:35 -0700
Message-ID: <6f20df81.0106081230.379d2a99_at_posting.google.com>
No, in the query below, you are basically saying that give me a list
of employees including
If you want to get a list of departments that have no employees, you
would write
SELECT dept.deptno, dept.dname
KnighThing <knighthing_at_hotmail.com> wrote in message news:<s2o1itsb60l4b7huvqfempgf4v8nlftd54_at_4ax.com>...
employees who are not assigned to a department.
your query with the (+) on dept.deptno as in
FROM emp, dept
WHERE emp.deptno = dept.deptno(+)
AND emp.ename is NULL;
> In this example (from the Oracle documentation):
>
> SELECT ename, job, dname
> FROM emp, dept
> WHERE emp.deptno (+) = dept.deptno;
>
>
> How would I get the list of departments with no employees?
>
> i.e.
>
> AND emp.deptno is null?
Received on Fri Jun 08 2001 - 22:30:35 CEST