>  기사  >  데이터 베이스  >  Oracle存储过程中PLS-00103:出现符号“/”在需要下列之一时:(

Oracle存储过程中PLS-00103:出现符号“/”在需要下列之一时:(

WBOY
WBOY원래의
2016-06-07 17:29:083041검색

Oracle存储过程中mdash;mdash;PLS-00103:出现符号ldquo;/rdquo;在需要下列之一时:(

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  i:= i+10; 
  select sum(salary),count(*) into summ countnum from emp where deptno=i; 
  result:=summ/countnum;
 end loop;
end;
/

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.