orcacle创建存储函数,创建完毕,test时候,发现有问题

![图片说明](https://img-ask.csdn.net/upload/201801/24/1516763697_871311.png)图片说明

1.第一行 参数 upName后面的逗号,
2.is 后面直接参数就可以了不需要declare

upate 的时候 应该是 直接用 name = upname 吧?! 不用 p.

这样写:
create or replace procedure person_sal(upName varchar2(40)) is
v_sal number
v_sql varchar2(1000)
begin
v_sql:='select sal from person where name=:1';
execute immediate v_sql
into v_sal
using upName;
if
v_sal<2000
then
v_sql:='update person set sal=sal+sal*10% where name=:1';
execute immediate v_sql
using upName;
end if;
end;