MySQL Forums
Forum List  »  Newbie

Simple task: Works in mysql 5 but not in 4.0.15
Posted by: goks goks
Date: August 17, 2005 04:07AM

My tables:

relation (gid, mid) both int(11)
members(mid,name) where r.mid references m.mid and name is a text not null

I try this simple query, which works great in version 5 but not 4.0.15:

SELECT m.name
FROM members m
WHERE m.mid NOT IN (select distinct r.mid from relation where r.gid = '1')

I keep getting #1064 - You have an error in your SQL syntax (near (select distinct r.mid from relation where r.gid = '1')).

Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Simple task: Works in mysql 5 but not in 4.0.15
August 17, 2005 04:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.