sql 两表更新

    

  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