将查出来的B表的名字设置为A表的名字ID相同的
update A inner join (select id,name from B) c on A.id = c.id set A.name = c.name;
本文介绍了一种使用SQL语句更新数据库中A表的名字为与之ID相同的B表名字的方法。通过内连接查询的方式,实现高效的数据同步更新。
将查出来的B表的名字设置为A表的名字ID相同的
update A inner join (select id,name from B) c on A.id = c.id set A.name = c.name;

被折叠的 条评论
为什么被折叠?