merge into 语法缺陷

merge into 语法缺陷?

test001

test001

当执行如下语句时:

Merge into test001 a
using test002 b
on (a.id=b.id and a.profid=b.profid)
when matched then
  update
  set a.profid=b.profid1;

会提示如下错误:

解决方法:

update test001 a
set (profid)=(select profid1 from test002 b where a.id=b.id and a.profid = b.profid)
原文地址:https://www.cnblogs.com/lijy/p/4196092.html