update tableA a left join tableB b on a.name_a = b.name_b set validation_check = if(start_dts > end_dts, 'VALID', '')
UPDATE payments p INNER JOIN users u ON p.pay_id=u.user_id SET p.pay_email=u.user_email, p.pay_firstname=u.user_firstname, p.pay_lastname=u.user_lastname, p.pay_date=u.user_date
[via]http://stackoverflow.com/a/1262848[/via]