UPDATE sale_origin_line set state='cancel' from sale_origin p,sale_origin_line q
where p.id=q.order_id and p.company_id='3' and p.date<'2017-08-01';
UPDATE sale_origin_line set state='cancel' from sale_origin p,sale_origin_line q
where p.id=q.order_id and p.company_id='3' and p.date<'2017-08-01';
转载于:https://www.cnblogs.com/1314520xh/p/7338592.html