我正在写下面的代码。将过程 IN 参数与光标值进行比较。
create or replace procedure dashboard_addtion(customer_name IN varchar2)
IS
num number:=0;
CURSOR cname_cur
IS Select customername from customer_master;
cname varchar2(300);
begin
for cname in cname_cur loop
if upper(cname.customername)!=upper(customer_name) then
num:=num+1;
end if;
end loop;
if num != 0 then
insert into customer_master select max(customerid) + 1, customer_name
from customer_master;
end if;
end;
一直在执行 INSERT 语句。