Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: need crash course in EXISTS
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