> MySQL doesn't support IN and NOT IN.  The manual and mailing lists
describe
> alternatives for many cases, but these are less readable (and maybe
slower).
>

I know that this response was directly related to a question about
subqueries, but I think it's important to point this out, because I almost
didn't pursue this avenue as a result.

As Fred pointed out, MySQL does not support IN and NOT IN, but *only* in the
case of subqueries:

select * from table 1 where id in (select id from table2)

However, it DOES support IN and NOT IN as long as a subquery is not used:

select * from table 1 where id in (115,515,614,23,51,24,15,12,51,23)

I still find I use the IN and NOT IN quite frequently, though it would be a
whole lot more efficient with subqueries (which I believe are coming with
version 4?)




---------------------------------------------------------------------
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