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

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

 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注