用存储过程实现吧
create or replace procedure p_instable
(in_a1 type,
in_a2 type,
............
in_a10 type)
as
begin
delete yourtable where a1=in_a1 and a2=in_a2;
insert into yourtable values(in_a1,in_a2,........,in_a10);
commit;
end;
create or replace procedure p_instable
(in_a1 type,
in_a2 type,
............
in_a10 type)
as
begin
delete yourtable where a1=in_a1 and a2=in_a2;
insert into yourtable values(in_a1,in_a2,........,in_a10);
commit;
end;
create or replace procedure p_instable
(in_a1 type,
in_a2 type,
............
in_a10 type)
as
begin
UPDATE yourtable
SET A3=IN_A3,...A10=IN_A10
where a1=in_a1 and a2=in_a2;
IF SQL%ROWCOUNT = 0 THEN --没有UPDATE任何纪录
insert into yourtable values(in_a1,in_a2,........,in_a10);
END IF;
end;这样的好处是有很多机会只要进行一次DML操作。