3,491
社区成员
发帖
与我相关
我的任务
分享
OPER@tl> select * from test;
AAA BBB
---------- ----------
1 1
OPER@tl> merge into test a using (select null aaa from dual) b
2 on (a.aaa=b.aaa)
3 when matched then update set a.bbb=999
4 when not matched then insert values(0,0)
5 /
1 行已合并。
OPER@tl> select * from test;
AAA BBB
---------- ----------
1 1
0 0
OPER@tl>