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: NOT IN vs MINUS

Re: NOT IN vs MINUS

From: Walter Dnes <waltdnes_at_waltdnes.org>
Date: Sat, 12 Feb 2000 23:15:07 -0500
Message-ID: <mmacasclblfcv816om1nfnt9v6fso4np7r@4ax.com>


On Thu, 10 Feb 2000 18:50:29 +1600,
wasef <mazafar4NOmaSPAM_at_onebox.com.invalid> wrote in article <1d3767a6.8cc3a038_at_usw-ex0108-062.remarq.com>:

> What is the difference betweein NOT IN and MINUS function?
> As Informix is not having MINUS function, then what will be
> impact on the query?

  MINUS is a set operator (remember Venn diagrams?)

  SELECT * FROM FOO
  MINUS
  SELECT * FROM BAR;   returns records that meet two conditions

  1. They are part of SELECT * FROM FOO AND
  2. They are not in SELECT * FROM BAR

  If you understand Venn diagrams, draw two circles that overlap slightly.
  Circle A = SELECT * FROM FOO;
  Circle B = SELECT * FROM BAR;
  The MINUS operation above returns that portion of Circle A which is NOT overlapped by Circle B. If there is no overlap then the the MINUS query is equivalent to SELECT * FROM FOO;

--
Walter Dnes <waltdnes@waltdnes.org> http://www.waltdnes.org SpamDunk Project procmail spamfilters.
A picture is worth a thousand words; unfortunately, it consumes the bandwidth of ten thousand words. Received on Sat Feb 12 2000 - 22:15:07 CST

Original text of this message

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