"SELECT IN SELECT" problem in MySQL
1) the result of sql statment "SELECT rsa_lookup_id FROM `rsa_policy_plan_lookup` WHERE rsa_plan_id=1" is "11,12,16"
2) Runing in MySQL properly if the sql statment "SELECT rsa_eventNature_id, rsa_eventNature_name FROM rsa_eventnature WHERE rsa_eventNature_id IN (11,12,16)
However, if I try to combine 1 & 2 into the sql statment "SELECT rsa_eventNature_id, rsa_eventNature_name FROM rsa_eventnature WHERE rsa_eventNature_id IN (SELECT rsa_lookup_id FROM `rsa_policy_plan_lookup` WHERE rsa_plan_id=1) "
the result is not the same #2. Why??? How to solve?
Much thanks.
Subject
Written By
Posted
"SELECT IN SELECT" problem in MySQL
September 19, 2014 08:36AM
September 19, 2014 02:55PM
September 21, 2014 08:52PM
September 22, 2014 09:48AM
September 23, 2014 05:07AM
September 21, 2014 09:24PM
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.