Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: A question about performing UPDATE and multiple tables

Re: A question about performing UPDATE and multiple tables

From: Ed Prochak <edprochak_at_gmail.com>
Date: Thu, 13 Sep 2007 20:05:35 -0700
Message-ID: <1189739135.716143.153680@22g2000hsm.googlegroups.com>


On Sep 10, 9:21 am, Brian Tkatch <N/A> wrote:
> On Fri, 07 Sep 2007 13:15:43 -0400, Ubiquitous <web..._at_polaris.net>
> wrote:
>

[]
> >Can someone point me to where I can find the differences between a join and a UNION of two tables?
> >I'm curious...
>
> UNION and a join are two different animals. UNION appends the records
> from the second query onto the result set of the first query. A join
> makes it as if it were wider TABLE.
>
> B.

Another way to think of it:

UNION is an addition operation

JOIN is a multiplication operation.

Consider tables A (6 rows) and table B (5 rows) both with columns PK and DPEND
then
SELECT * FROM A
UNION
SELECT * FROM B;
yields a result set with 2 columns and 11 rows but
SELECT * from A , B
(i.e a full join)
produces a result set with 4 columns and 30 rows.

 HTH,
  Ed Received on Thu Sep 13 2007 - 22:05:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US