前面分享了使用python脚本进行批量更新,其实相对来说比较复杂,需要有必须的py环境组件等。
今天分享一个两表批量更新的sql语句
注:下面代码更换自己的表字段
update a set a.修改字段=
(select b.info from b表 b where a.id=b.id)
where exists
(select 1 from b where a.id =b.id);
大佬请跳过!!!
前面分享了使用python脚本进行批量更新,其实相对来说比较复杂,需要有必须的py环境组件等。
今天分享一个两表批量更新的sql语句
注:下面代码更换自己的表字段
update a set a.修改字段=
(select b.info from b表 b where a.id=b.id)
where exists
(select 1 from b where a.id =b.id);
大佬请跳过!!!