mysql批量修改


update odr_order_base
INNER JOIN (select merchant_id,order_base_id from odr_order_commodity) b on odr_order_base.order_base_id = b.order_base_id set odr_order_base.merchant_id = b.merchant_id

update odr_order_base_his a
INNER JOIN (select merchant_id,status,pay_status,pay_time,order_base_id from odr_order_commodity_his) b on a.order_base_id = b.order_base_id set a.merchant_id = b.merchant_id, a.status=b.status,a.pay_status=b.pay_status,a.pay_time=b.pay_time


update odr_order_commodity a
INNER JOIN (select merchant_id,status,pay_status,pay_time,order_base_id from odr_order_base) b on a.order_base_id = b.order_base_id set a.merchant_id = b.merchant_id, a.status=b.status,a.pay_status=b.pay_status,a.pay_time=b.pay_time

posted @ 2020-03-06 11:12  怕黑,可是却恋上了夜  阅读(144)  评论(0编辑  收藏  举报