mysql更新一个表里的字段等于另一个表某字段的值

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;

 

 

 

你可能感兴趣的:(mysql)