IN is supported in mysql, but subqueries do not work before 4.1.x. You could rewrite your query with a join, though. Something like:

  SELECT table1.* FROM table1, table2
  WHERE table1.item_id = table2.item_id

See <http://www.mysql.com/doc/en/Rewriting_subqueries.html> for more.

Michael

Scott Purcell wrote:

I am trying to run the below query, and believe that the 'IN' is not supported in mysql. What is the 'IN' replacement? I tried exists and that doesn't work.

select * from table1
    where item_id IN (select item_id from table2)



Thanks,
Scott






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to