根据B表数据批量修改A表中数据

需求:两张表table_a和table_b都有vin字段,需要将table_b中的model数值赋值给table_a中相同vin对应的model字段
update table_a A set A.model = (SELECT model FROM table_b B  where A.vin=B.vin) 

猜你喜欢

转载自blog.csdn.net/yangfengjueqi/article/details/79803314