RE: Quick question re outer joins

  • From: "Powell, Mark D" <mark.powell@xxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 23 Jul 2004 10:17:31 -0400

If Table A is the driver and the table we always want a row to be returned
from and we join it to table B with the "(+)" on the B side of the where
clause conditions.  Now Table B has 0 or more rows for every row in A.  When
there is no match the row in A is still returned.  When there is a match the
row in A is returned for each and every match in B just as in normal inner
join.  So if 3 three rows in B that share the join keys with A you will get
2 extra rows compared to just a count(*) from A based on the A table where
conditions.

HTH -- Mark D Powell --


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Nuno Souto
Sent: Friday, July 23, 2004 10:07 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: Quick question re outer joins


jo_holvoet@xxxxxxxx apparently said,on my timestamp of 23/07/2004 6:50 PM:

> If the relationship to the new table is 1-N, it could potentially add rows

> just like a regular join, couldn't it ?

How?
If it finds a corresponding row, it puts its column value in the output.
If it doesn't, it puts a NULL there.  How can that add rows?

-- 
Cheers
Nuno Souto
in sunny Sydney, Australia
dbvision@xxxxxxxxxxxxxxx
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: