当前位置:Gxlcms > 数据库问题 > mysql与sqlserver不同第一弹

mysql与sqlserver不同第一弹

时间:2021-07-01 10:21:17 帮助过:3人阅读

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,‘注销‘,‘吊销‘)

mysql与sqlserver不同第一弹

标签:join   new   sql   rom   any   where   sqlserver   not   from   

人气教程排行