错误1054:字段列表和where子句中的未知列

时间:2014-12-28 21:31:50

标签: mysql mysql-error-1054

我在这里遗漏了一些东西,不知道是什么。请帮帮我。

我正在尝试使用where子句将vs_smelter_temporary中的数据复制到vs_smelter_ext中


use test;
Update vs_smelter_ext
SET vs_smelter_ext.Certification_Status = vs_smelter_temporary.Certification_Status
where 
vs_smelter_ext.Smelter_Id = vs_smelter_temporary.Smelter_Id
 ;

1 个答案:

答案 0 :(得分:0)

您需要加入临时表:

UPDATE vs_smelter_ext 
     JOIN vs_smelter_temporary ON vs_smelter_ext.Smelter_Id = vs_smelter_temporary.Smelter_Id 
     SET vs_smelter_ext.Certification_Status = vs_smelter_temporary.Certification_Status;