求助:编写过程时出现“错误文本= PLS-00103”怎样解决??

Raymond C WTsing 2010-05-26 09:27:19
今天做oracle 9i的实验,内容是“创建一个过程avg_sal,用于输出emp表中的某个部门的平均工资,并在PL/SQL匿名块调用该过程输出部门SALES的平均工资”,所写过程如下:
create or replace procedure sys.avg_sal
(department varchar2,avgsal number)is
begin
select ENAME,avg(sal) into deparment,avgsal
from SCOTT.EMP
where ENAME=department;
end avg_sal;

出错信息:“行号= 1 列号= 27 错误文本= PLS-00103: 出现符号 "CREATE"在需要下列之一时: ( ; is with authid as cluster compress order using compiled wrapped external deterministic parallel_enable pipelined

请问各位怎么解决这个问题?
...全文
138 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
pig 2011-07-19
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 clarence_c 的回复:]
已经解决了,谢谢你们。
[/Quote]怎么解决的呀?不贴出来!
Raymond C WTsing 2010-06-01
  • 打赏
  • 举报
回复
已经解决了,谢谢你们。
ojuju10 2010-05-26
  • 打赏
  • 举报
回复
create or replace procedure sys.avg_sal
(department in varchar2,avgsal out number)is
begin
select avg(sal) into avgsal
from SCOTT.EMP
where ENAME=department;
end avg_sal;
kingkingzhu 2010-05-26
  • 打赏
  • 举报
回复
create or replace procedure avg_sal(department out varchar2,
avgsal out number) is
begin
select ENAME, avg(sal)
into department, avgsal
from SCOTT.EMP
where ENAME = department;
end avg_sal;

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧