从一个表中获取字段值更新到另一个表中的SQL
UPDATE ms_cw_fund as f inner join
ms_service_orderinfo as o on o.order_sn=f.order_sn
SET f.user_id = o.shop_id where DATE(f.add_datetime) in ('2017-01-05','2017-01-06') AND f.order_project_type = 3;
从一个表中获取字段值更新到另一个表中的SQL
UPDATE ms_cw_fund as f inner join
ms_service_orderinfo as o on o.order_sn=f.order_sn
SET f.user_id = o.shop_id where DATE(f.add_datetime) in ('2017-01-05','2017-01-06') AND f.order_project_type = 3;