Mysql将其他表中的数据更新到指定表中

update tb  set tb.字段= (select 字段 from tb1 where tb.字段1 = tb1.字段1);


update role set uid = (select ID from users where role.name=name);
原文地址:https://www.cnblogs.com/change4now/p/8372220.html