Re: Convert WHERE IN to JOINS not same results
The queries diverge logically:
...WHERE `to` IN(select profile_id from `user_profiles` where is_fake=1 and user_id=1)...
entirely excludes non-matches on the condition, but
...LEFT JOIN user_profiles fake ON fake.profile_id = a.to and fake.is_fake=1 and fake.user_id = 1...
does not.
If you don't believe, build a test case for yourself.
Subject
Written By
Posted
February 14, 2018 12:32AM
Re: Convert WHERE IN to JOINS not same results
February 14, 2018 12:27PM
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.