Re: What does the (+) operator mean in sql queries?

From: Gerard H. Pille <ghp_at_skynet.be>
Date: Sun, 14 Apr 2002 22:36:27 +0200
Message-ID: <3CB9E84B.FB2D7722_at_skynet.be>


George Weer wrote:
>
> Hello,
>
> I have a query which is this:
>
> SELECT supplier.id
> FROM supplier, order
> WHERE supplier.id = order.suppid (+)
> AND order.suppid IS NULL;
>
> I'm curious as to what the (+) is for in the query. I'm new in a job which
> uses alot of oracle and i'm just starting.
>
> --
> Thanks lots
>
> Sorry for C/P not sure where to post.

it causes an outer join, in this case on order, so you would get even those suppliers that have no orders. I'm a bit puzzled about this query, does it select only those suppliers that have no orders?

I believe a "where not exists" would be much more performant.

-- 

Gerard H. Pille

(The Beatles Reunion is neigh!)
Received on Sun Apr 14 2002 - 22:36:27 CEST

Original text of this message