mysql update 多表
示例:
UPDATE t_contact c, t_header h
set c.cust_no = h.eu_no
where c.contract_no = h.contract_no
and c.contract_type = h.contract_type
and c.company_type=1
update t_contact c
INNER JOIN t_header h
on c.contract_no = h.contract_no
and c.contract_type = h.contract_type
and c.company_type=1
set c.cust_no = h.eu_no
还没有评论,来说两句吧...