SQL Update:使用一个表的数据更新另一张表

表结构

功能

用表B的数据(mc列)更新表A的mc列

SQL Server

update A SET A.mc = b.mc FROM A ,B WHERE  A.bmbh = B.bmbh and A.xmbh = B.xmbh;

Access

update A, B  set A.mc = B.mc where A.bmbh = B.bmbh and A.xmbh = B.xmbh;

update A INNER JOIN B ON A.bmbh = B.bmbh AND A.xmbh = B.xmbh SET A.mc = B.mc;

转载于:https://www.cnblogs.com/rainman/p/3584005.html

评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符 “速评一下”
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页