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: SQL Question

Re: SQL Question

From: Paul Wiles <paul_at_adzi.com>
Date: Wed, 26 May 1999 11:19:39 +0100
Message-ID: <374bca70@newsread3.dircon.co.uk>


Why do you refer to 'not in' as dreaded ?

Mark Gumbs wrote in message <374bc56e.0_at_145.227.194.253>...
>The two statements in your instance are equivalent but bear in mind that
>when using the minus, the statemennt has to be in the correct order, ie
>tableA minus Tableb is not the same as tableB minus tableA.
>
>Use set operators instead of the dreaded not in if you can, it should be
>faster.
>
>Mark
>
>Paul Davies wrote in message <374bb823_at_newsread3.dircon.co.uk>...
>>Are intersects and joins equivalent?
>>
>>So is the query:
>>
>>select part from orders_list1
>>intersect
>>select part from orders_list2
>>
>>the same as
>>
>>select a.part from orders_list1 a, orders_list2 b where b.part = a.part
>>
>>Similarly is
>>
>>select part from orders_list1
>>minus
>>select part_from orders_list2
>>
>>the same as
>>
>>select part from orders_list1 where part not in (select part from
>>orders_list2)
>>
>>If they are equivalent, when should one choose to use a set operator as
>>opposed to a join or not in query?
>>
>>Help appreciated
>>
>>Paul
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
Received on Wed May 26 1999 - 05:19:39 CDT

Original text of this message

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