It is explained here http://erabhinavrana.blogspot.in/2014/01/how-to-execute-update-query-by-applying.html
It also has other useful code snippets which are commonly used.
update <dbname of 1st table>.<table name of 1st table> A INNER JOIN <dbname of 2nd table>.<table name of 2nd table> RA ON A.<field name of table 1>=RA.<field name of table 2> SET A.<field name of table 1 to be updated>=RA.<field name of table 2 to set value in table 1>
Replace data in <>
with your appropriate values.
That's It. source: