Portal Home > Knowledgebase > Articles Database > mysql subquery/join help


mysql subquery/join help




Posted by ti_nhatrang, 01-30-2012, 07:32 PM
Hi all, I'm trying to do the following but it will not work because it comes back as your sub query has more than one row. Somewhere on the internet, it's telling me to do a join but due to my age I have a mental block that I can't seem to comprehend the JOIN statement without some easier examples. Therefore, I'm asking for your help within my scenario to help me learn. Thank you in a advance. Please help me re-write the below to something that would accomplish this task:

Posted by foobic, 01-30-2012, 09:05 PM
While you can use JOIN with UPDATE, for this I'd stick with a subquery and keep it simple. You should be able to cope with multiple rows from the subquery using IN.

Posted by ti_nhatrang, 01-31-2012, 02:11 AM
Wow, amazing, thank you so much! Never in my mind was to use WHERE IN instead. Thanks for your help.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
IP address (Views: 507)