MySQL Forums
Forum List  »  Newbie

Using subquery IN
Posted by: jsevera
Date: March 17, 2005 08:29AM

Hi, I am using MySQL 4.0.23_Debian-7 and I try to use subquery with "IN"
E.g. SELECT s1 FROM t1 WHERE s1 = ANY (SELECT s1 FROM t2);
SELECT s1 FROM t1 WHERE s1 IN (SELECT s1 FROM t2); from the manual
Both of these types of queries return this error message:
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Select .... ErrorNr. 1064"
The sql example 'SELECT s1 FROM t1 WHERE s1 IN (SELECT s1 FROM t2)" is from the correct version manual of the server.
When I try to use the same query with server version 4.1.8-nt, it works fine.
Could someone help me please?
Thank you in advance
John

Options: ReplyQuote


Subject
Written By
Posted
Using subquery IN
March 17, 2005 08:29AM


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.