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: odd sub-select problem

Re: odd sub-select problem

From: Damien Salvador <damien.salvador_at_via.ecp.fr>
Date: 29 Oct 2001 18:14:35 GMT
Message-ID: <slrn9tr74b.1hk.damien.salvador@zen.via.ecp.fr>


On 29 Oct 2001 10:11:57 -0800, Daniel Schmolze <usenet_at_schmolze.com> a écrit:
>Both these tables have a NAME column in the same domain. I want to
>display the NAMEs in A which are not in B. To do this, I'm using the
>following query:
>
>SELECT NAME FROM A
>WHERE NAME NOT IN (SELECT NAME FROM A)
>
>This returns no rows. If, however, I do the following:
>
>SELECT NAME FROM A
>WHERE NAME IN (SELECT NAME FROM A)
There must be a typo :-)

You should try "minus", it could be more efficient. As for your question, are you names unique ?

-- 
Damien
Received on Mon Oct 29 2001 - 12:14:35 CST

Original text of this message

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