更新单个字段的值从一张表查数据到另一张表中
update A INNER JOIN B ON A.bmbh = B.bmbh AND A.xmbh = B.xmbh SET A.mc = B.mc;
实例:update b_building_property_copy a , b_building_property b where a.id = b.id and a.cityid=b.cityid
SET a.gpsDeviceCount = b.deviceCount;
另一种写法:
update b_building_property_copy a left join b_building_property b on
a.bid=b.id set a.gpsDeviceCount = b.deviceCount;