mysql update 多表

拼搏现实的明天。 2022-06-08 08:21 222阅读 0赞

示例:

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

发表评论

表情:
评论列表 (有 0 条评论,222人围观)

还没有评论,来说两句吧...

相关阅读