更新查询加入不工作MySQL

时间:2017-09-22 10:32:48

标签: mysql sql

UPDATE rates_master
  SET rates_master.fees_information = rates_master_old.fees_information 
from rates_master
  INNER JOIN rates_master_old
    ON rates_master.id=rates_master_old.id;

4 个答案:

答案 0 :(得分:1)

请尝试以下操作:

UPDATE rates_master
SET rates_master.fees_information = rates_master_old.fees_information 
from rates_master, rates_master_old
where rates_master.id=rates_master_old.id;

答案 1 :(得分:0)

MySQL中的正确语法是:

UPDATE rates_master rm JOIN
       rates_master_old rmo
       ON rm.id = rmo.id;
    SET rm.fees_information = rmo.fees_information ;

答案 2 :(得分:0)

UPDATE rates_master inner join rates_master_old ON rates_master.id=rates_master_old.id
  SET rates_master.fees_information = rates_master_old.fees_information;

答案 3 :(得分:0)

   UPDATE rates_master 
   INNER JOIN rates_master_old ON rates_master.id=rates_master_old.id;
   SET rates_master.fees_information = rates_master_old.fees_information from rates_master