3,492
社区成员
发帖
与我相关
我的任务
分享
select count(*) into v_cnt from table_name where primary_key = pk
if v_cnt = 0 then
insert into table_name values(pk);
end if;
insert into table_name(primary_key)select pk from dual
where not exists (select 1 from table_name where primary_key = pk)