List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 14 2001 12:03am
Subject:Re: Help with using IN Clause, does mysql support it???
View as plain text  
At 7:04 PM -0400 7/13/01, <tysonlowery@stripped> wrote:
>Ok, I've been writing SQL for a few years now, but only recenlty started
>using Mysql.  I have a website hosted at a third party that uses mysql
>3.23.36
>
>I keep getting errors when I try to run fairly straight forward queries with
>the IN clause like:
>select var1 from table1 where var1 not in (select var2 from table2)
>
>I also get errors when doing the equivalent on an update:
>update table1 set var1 = "test" where var1 in (select var2 from table2)
>
>The error I get says: "You have an error in your SQL syntax near select var2
>from table2"
>
>Does mysql support the IN clause?  I'm lost without it, particular with
>updates.  Please help!

MySQL doesn't support sub-selects.

http://www.mysql.com/doc/M/i/Missing_Sub-selects.html

>
>Thanks,
>Tyson


-- 
Paul DuBois, paul@stripped
Thread
Help with using IN Clause, does mysql support it???tysonlowery14 Jul
  • Re: Help with using IN Clause, does mysql support it???Paul DuBois14 Jul