我正在尝试这样做,但我在mySQL上遇到错误:
update ONE set (ONE.Names=TWO.New_Names)
from ONE
join TWO on (ONE.Names=TWO.Old_Names);
答案 0 :(得分:1)
update ONE
join TWO on ONE.Names = TWO.Old_Names
set ONE.Names = TWO.New_Names
答案 1 :(得分:1)
查看更新查询:
update one o
join two t on ( o.names = t.old_names )
set O.names = t.new_names;
join子句必须在query =>的开头写入 http://sqlfiddle.com/#!9/9f292c