Oracle存储过程中——PLS-00103:出现符号“/”在需要下列之一时
Oracle中编写一存储过程:出现如下错误,
PLS-00103:出现符号“/”在需要下列之一时:(
经过各种谷歌百度,在存储过程中定义变量不允许使用关键字,而我定义了变量sum,导致错误。
经过编译后的过程代码为:
create or replace procedure avg_sal(result out char)
is
i number(5);
summ number(20);
countnum number(20);
begin
i:=10;
while i<40 loop
i:= i+10;
select sum(salary),count(*) into summ countnum from emp where deptno=i;
result:=summ/countnum;
end loop;
end;
/
相关推荐
Omega 2020-08-16
zjyzz 2020-08-16
minggehenhao 2020-07-28
zhaojp0 2020-06-27
zjuwangleicn 2020-06-25
wenjieyatou 2020-06-17
liaomingwu 2020-06-16
hungzz 2020-06-16
muzirigel 2020-06-14
gsmfan 2020-06-14
ncomoon 2020-06-14
xiaobaif 2020-06-13
Rain 2020-06-12
hanshangzhi 2020-06-12
talkingDB 2020-06-12
IBMRational 2020-06-09
snowguy 2020-06-01