Re: How do you find the "unmatched" fields in a join

From: Eric <efried_at_bellsouth.net>
Date: Sat, 09 Jun 2001 23:28:59 GMT
Message-ID: <kgyU6.21645$i4.904639_at_e420r-atl1.usenetserver.com>


The (+) is only for Oracle and indicates an outer join.

Eric

In article <6f20df81.0106081230.379d2a99_at_posting.google.com>, pkho_at_gt.ca (Peter Kho) wrote:
>No, in the query below, you are basically saying that give me a list
>of employees including
>employees who are not assigned to a department.
>
>If you want to get a list of departments that have no employees, you
>would write
>your query with the (+) on dept.deptno as in
>
>SELECT dept.deptno, dept.dname
>FROM emp, dept
>WHERE emp.deptno = dept.deptno(+)
>AND emp.ename is NULL;
>
>KnighThing <knighthing_at_hotmail.com> wrote in message
> news:<s2o1itsb60l4b7huvqfempgf4v8nlftd54_at_4ax.com>...
>> 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?



Eric Internet: efried_at_bellsouth.net Received on Sun Jun 10 2001 - 01:28:59 CEST

Original text of this message