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

Home -> Community -> Usenet -> c.d.o.server -> Re: need crash course in EXISTS

Re: need crash course in EXISTS

From: Glenn Baron <gbaron_at_dial.pipex.com>
Date: 26 May 1999 22:12:37 GMT
Message-ID: <01bea7c5$2d3b27c0$414a95c1@default>


It's a bit late and I've had a few beers, but I'd imagine table A has 458 rows...

The second query is uncorrellated, i.e. whenever the EXISTS clause is true, you will return a row from table A.

There is no link between table A and the sub-query. Therefore you return ALL the rows in table A

Doug Cowles <dcowles_at_bigfoot.com> wrote in article <374C6C75.1995B3F7_at_bigfoot.com>...
> two tables, identical layouts, let's call them A and B, each with a
> number and a char
> for simplicity.
>
> This query yields 81 rows.
> select a from A
> MINUS
> select a from B
>
> This query returns 458 rows -
> select * from A
> where
> EXISTS
> (select a from A
> MINUS
> select a from B)
>
> What gives?
>
> - Dc.
>
>
Received on Wed May 26 1999 - 17:12:37 CDT

Original text of this message

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