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)

 

posted on 2014-12-31 16:54  modDx  阅读(908)  评论(0编辑  收藏  举报

导航