mysql通过对比一张表的数据来修改另一张表两种sql的对比

https://blog.csdn.net/weixin_39180123/article/details/78720222

将表b 中的字段值 赋值给表a 字段值

UPDATE powershu_aiops_biz_dev.aiops_cmdb_host a,
bjetc_aiops_biz_deploy.aiops_cmdb_host b
SET a.type=b.type ,a.zone = b.zone ,
a.biz_category = b.biz_category ,
a.tags = b.tags ,
a.os_type = b.os_type
WHERE a.alias_name = b.alias_name

 

posted @ 2020-12-23 14:20  胖头陀春天  阅读(846)  评论(0编辑  收藏  举报