Re: A (+) in the where clause

From: Peter Kane <pkane_at_cisco.com>
Date: 3 Aug 1993 16:26:21 GMT
Message-ID: <23m3jdINNh4j_at_cronkite.cisco.com>


In article <1521_at_grivel.une.edu.au> rpaulo_at_metz.une.edu.au (Reynaldo Paulo) writes:
>Does anyone out there know what the (+) in the following
>statement means?
>
>select <something>
> into <avariable>
> from <atable>
> where atable.field (+) = <somevalue>

It's called an outer join. It returns values even if the match referred to by the outer join fails. I don't see much point in doing an outer join with a one table select statement, but here is the example from the Oracle SQL Language manual:

select dept.deptno, dname, sum(sal)
from emp, dept
where emp.deptno (+) = dept.deptno
group by dept.deptno, dname
order by dept.deptno

this will return values even when the emp.deptno has no match in dept.deptno Any selected values from the table that isn't matched to will return a null value, I think. You can always do a nvl (field, 0) or something to get around this if you need to.

Peter Received on Tue Aug 03 1993 - 18:26:21 CEST

Original text of this message