MySQL Forums
Forum List  »  General

Syntax Error on Subquery
Posted by: maggie xian
Date: October 05, 2004 03:45AM

In mysql command line,
SELECT s1 FROM t2;
it returns 1012
SELECT s1 FROM t1 WHERE s1 IN (1012);
it returns 1
but when I execute the following statement with subquery
SELECT s1 FROM t1 WHERE s1 IN (SELECT s2 FROM t2);
it prompts a syntax error 1064. s1 and s2 are the same data type.

Any suggestion?

Options: ReplyQuote


Subject
Written By
Posted
Syntax Error on Subquery
October 05, 2004 03:45AM
October 05, 2004 04:12PM


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.