SQL Update: use a data table to update another table

Table Structure

Features

A data update table of table B (mc columns) Column 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;

or

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

Reproduced in: https: //www.cnblogs.com/rainman/p/3584005.html

Guess you like

Origin blog.csdn.net/weixin_33695082/article/details/93561356