标签:join new sql rom any where sqlserver not from
1,两表关联并更新
--sqlserver
update a set a.reg_date = b.reg_data
from gsk_all_to_creditchina a,gsk_re.gsk_new_mysql b
where a.company_name=b.company_name
and a.status not in (2,3,4,‘注销‘,‘吊销‘)
--mysql
UPDATE gsk_all_to_creditchina a
LEFT JOIN
gsk_re.gsk_new_mysql b
ON a.company_name=b.company_name
SET a.reg_date = b.reg_data
WHERE a.status not in (2,3,4,‘注销‘,‘吊销‘)
标签:join new sql rom any where sqlserver not from
原文地址:https://www.cnblogs.com/cheng-cheng/p/12169780.html