UPDATE ecs_goods a INNER JOIN ecs_goods_attr s ON a.goods_id=s.goods_id and s.attr_id=214 SET a.goods_sn=s.attr_value