0
我想在oracle中,我使用的查询合并两个表是甲骨文合并的命令错误缺少关键字
merge into sales_history sh
using sales s
on (s.prod=sh.prod and s.month=sh.month)
when matched
update set sh.amount = s.amount
when not matched
insert (sh.prod,sh.month,sh.amount)
values (s.prod,s.month,s.amount);
每当我执行这个查询我得到以下错误:
ORA-00905 missing keyword.
谁能帮我这个。
'匹配时THEN更新....当THEN不匹配...' –
是的,我发现了错误,但非常感谢你答复环:) –