MySQL Forums
Forum List  »  Newbie

Subqueries on MySQL 4.0.14-standard
Posted by: Damian Creedon
Date: June 27, 2005 08:55AM

Hello,
I am trying to run this query on MySQL 4.0.14-standard and it is not working, mainly due to the fact that the version of MYSQL does not support sub-queries. I need to re-write it using joins etc.. I have failed do do this and I am losing my mind....

Here is the SQL with the subquery, can someone help, please

SELECT * FROM contacts WHERE username = 'damiancreedon@hotmail.com' AND id NOT IN (SELECT contactid FROM groupmembers WHERE username = 'damiancreedon@hotmail.com' AND groupname='Family')

Basically get everything in the contacts table that does not have an entry in the groupmembers table for a particular user and group.

Options: ReplyQuote


Subject
Written By
Posted
Subqueries on MySQL 4.0.14-standard
June 27, 2005 08:55AM


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.