select * from tb_test;
insert into tb_test(CODE, TEXT) values (1, 'test');
 
-- 这里正常
merge into tb_test t
using (select 1 code,'test' text from dual union all
       select 1 code,'test' text from dual) s
on (t.code = s.code)
when matched then
update set t.text = s.text;
 
-- 这里 error: ORA-30926
merge into tb_test t
using (select 1 code,'test1' text from dual union all
       select 1 code,'test1' text from dual) s
on (t.code = s.code)
when matched then
update set t.text = s.text;
 
-- 这里 error: ORA-30926
merge into tb_test t
using (select 1 code,'test1' text from dual union all
       select 1 code,'test2' text from dual) s
on (t.code = s.code)
when matched then
update set t.text = s.text;
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Jalen Chu 微信支付

微信支付

Jalen Chu 支付宝

支付宝

Jalen Chu 公众号

公众号