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

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 15 Apr 2002 20:57:18 -0500
Message-ID: <ulmbo1bkl.fsf_at_rcn.com>


[Quoted] [Quoted] On Sun, 14 Apr 2002, RubberDucky703_at_hotmail.com wrote:

> How does the outer join work?

CONSIDER:     SQL> select * from t1;

          FLD1


             1
             2
             3
             4

    SQL> select * from t2;

          FLD1


             2

Now, here is what happens when you outer join.

    SQL> select * from t1,t2 where t1.fld1 = t2.fld1 (+);

          FLD1 FLD1

  • ---------- 1 2 2 3 4

Okay, now, I only want a certain number of rows from t1.

    SQL> select * from t1,t2 where t1.fld1 = t2.fld1 (+) and t1.fld1 < 4;

          FLD1 FLD1

  • ---------- 1 2 2 3

Make sense?

Here's some doc on it.

http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a85397/expressi.htm#1023213

> Does oracle do the supplier.id = order.suppid FIRST?

Sort of.

> If so doesn't a join require two inputs so how does it then do the
> outer join? given that it has only the result of the join
> (i.e. supplier.id)??

Oracle has more to work with than just the select list.

> Confused!

Been there.

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Tue Apr 16 2002 - 03:57:18 CEST

Original text of this message