mysql表a的字段更新到表b的字段

UPDATE tp_shi a set a.author = 
    (SELECT b.id from tp_author b where a.author = b.name);

 

类似文章