Re: difference nested select union
Posted in 1996
Bryan Tonnet wrote:
>
> > select a.id, b.id name
> > from a, outer b
> > where a.id = b.id> >
>
> I think these 2 should be different, shouldn't they? The first one selects
> a.id's which are not in b, and the second one selects a.id's that are in b.
> Was there a typo in your original post, or just a brain warp on the syntax
> (happens to everyone, I get at least 4 a day).
>
> Bryan Tonnet
> batonnet@zeta.org.au
In the original, he said or at least implied, that in the second
query, we are only counting the records where b.id (alias "name") is
null, (implying that we would maybe select into a temp table first,
then select from the temp table where name is null. And the two
queries should maybe give the same end result (unless theres null
data in the records?).
--
Sincerly,
Doug Wilson(dougw@amgen.com)
*** The opinions expressed here are my own and not neccessarily ***
*** anyone elses ****
*** Disclaimer: These are the opinions of the poster not Amgen Inc.***