UPDATE mem_user_yun_temp t1 ,mem_user_temp t2 SET t1.ralation_id = t2.id ,t1.ralation_memberid = t2.memberid ,t1.login_name = t2.login_name where t1.id = t2.tempid;
UPDATE (
SELECT tt.* from yun_trust_patent_temp tt where tt.PATENT_ID_new not in( SELECT DISTINCT t2.PATENT_ID_ from yun_trust_patent_temp t ,yun_trust_patent t2 where t.PATENT_ID_new = t2.PATENT_ID_ and t2.PATENT_ID_ != '')
) AA ,yun_trust_patent BB set BB.PATENT_ID_ = aa.PATENT_ID_new where AA.PARENT_ID_old = BB.PATENT_ID_;