MySQL跨表更新SQL

1 sql范式  把s表中的city_name的值设置为city表中的name,关联条件是city_code 和 code

update student s, city c
   set s.city_name = c.name
 where s.city_code = c.code;

  

原文地址:https://www.cnblogs.com/QuestionsZhang/p/11606361.html