if exits (select * from Customer where Customer_name='张三')
begin
update Customer
set Customer_name='张三'
where
end
else
insert into "Customer" (Customer_name) values ('张三')
declare
v_num number :=0;
begin
select count(*) into v_num from Customer where xxx(条件);
if v_num>0 then
update......
else
insert......
end if;
commit;
end;
使用merge试试