IN is supported in 4.1, I'm not sure about 4.0. But any, you can do you query like this:

select table1.* from table1
left join table2 on table1.item_id=table2.item_id
where table2.item_id is not null

I think that's right. It may actually be quicker than using IN.


On Feb 6, 2004, at 2:20 PM, 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)


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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



Reply via email to