求助,Oracle报存储过程编译错误 创建时时是对着书上的例子来写的,对了好几次。没看出什么问题来。求助各位大神。
代码如下:
1 create or replace procedure sele_emp
2 (
3 v_id in emo.empno%type;
4 v_sal out emo.sal%type;
5 )
6 as
7 begin
8 select sal into v_sal from emp where empno=v_id;
9 end;
10 declare
11 v1 emp.sal%type;
12 begin
13 sele_emp(7788,v1);
14 dbms_output.put_line('所得税金额':||v1);
15* end;
16 /
警告: 创建的过程带有编译错误。
QL> create or replace procedure last1_emp(id number,on_flag out number)
2 is
3 begin
4 select comm into on_flag from emp where empno=id;
5 end;
6 declare
7 v1 emp.comm%type;
8 begin
9
10 last1_emp(7566,v1);
11 dbms_output.put_line('工资级别:'||v1);
12 end;
13 /