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;

 

posted @ 2016-06-08 16:30  清风吹云  阅读(986)  评论(0编辑  收藏  举报