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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Avoiding Duplicates and Transitive Operations

RE: Avoiding Duplicates and Transitive Operations

From: MacGregor, Ian A. <ian_at_SLAC.Stanford.EDU>
Date: Fri, 27 Jul 2001 19:17:07 -0700
Message-ID: <F001.003581E9.20010727192519@fatcity.com>

Wow, I guess we all have or not so bright moments.

Ian MacGregor
Stanford Linear Accelerator Center
ian_at_slac.stanford.edu

-----Original Message-----
Sent: Friday, July 27, 2001 5:36 PM
To: Multiple recipients of list ORACLE-L

...

>What I want to know is if
>
>SQL> SELECT C1, C2 FROM ian.TEST1
> 2 WHERE EXISTS (SELECT C1 FROM ian.TEST2)
>
>
>undergoes a transitive operation to
>
> SELECT C1, C2 FROM ian.TEST1
> 2 WHERE EXISTS (SELECT C1 FROM ian.TEST2
> where test1.c1 = test2.c1)
>
>/
>------------------------------------------------------------------------------------------------------------------------

Of course not, why would it do that? All you asked for was the records from TEST1 as long as there exist ANY records in TEST2, and that's what you got. If you add more records to TEST1, you would see that you have established no links between the tables. If you want the second statement, you have to ask for it.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Regina Harter
  INET: rharter_at_emc-inc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: MacGregor, Ian A.
  INET: ian_at_SLAC.Stanford.EDU

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jul 27 2001 - 21:17:07 CDT

Original text of this message

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