Bob Hall wrote:
> 
> >I want to do a select like
> >
> >select id from test
> >where id in (select id from test where value in (1,2,3)
> >and id in (select id from test where value in (4,6,7)
> >and id in (select id from test where value in (1,6,25)
> 
> Even if MySQL supported subqueries, this query would always return
> the empty set. I'm really unsure about what you're trying to do, but
> I think the following comes close.
>     SELECT id
>     FROM test
>     WHERE value IN (1, 2, 3, 4, 6, 7, 25);
> 


No the query I wrote would return the intersection of three
lists of user ids where each list contained any users that 
had the values listed.

Your query would return all user ID's who had any of the number
listed which is not what I need... but thanks...

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to