I try this query in PhpMyAdmin:
INSERT INTO t1 ( col1, col2 )
SELECT DISTINCT col1, col2
FROM t2
WHERE (SELECT col3 FROM t1) = ANY (SELECT col3 FROM t2)
but given me that error: #1242 – Subquery returns more than 1 row !
anyone can fix it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
WHEREcondition is not correct, because it tries to compare a single value to a set; this is precisely what the error is trying to tell you.Try this instead: