mysql 同一数据表中一列数据等于另一个数据相同字段之和且随该字段的更新而更新,怎么设置

2024-11-13 19:23:16
推荐回答(1个)
回答1:

update a left join c on a.id = c.id set a.body = c.c1 where a.id=c.id;

update zcat as z left join zcat_bak_1212 as zb on z.zcatId = zb.zcatId set z.zcatName = zb.zcatName where z.zcatName is null;