mysql与sqlserver不同第一弹
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,‘注销‘,‘吊销‘)
相关推荐
王艺强 2020-11-17
CoderToy 2020-11-16
emmm00 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11