高手请指点,程序包问题。。。。急

代码如下:
CREATE OR REPLACE PACKAGE MyPackge is
TYPE cs is REF CURSOR;
procedure GetList(out_rs out cs);
END MyPackge;

create or replace PACKAGE body MyPackge
is
   procedure   GetList(out_rs out cs)
   is
   begin
        open out_rs for select * from dept
   end;
end;

报错信息:
Compilation errors for PACKAGE SCOTT.MYPACKGE
Error: PLS-00103: 出现符号 "CREATE"

解决进度:
经过一轮查资料,还没有解决该问题。
期待高手指点。
我也来说两句 查看全部回复

最新回复

  • yzsind (2008-8-24 13:45:42)

    CREATE OR REPLACE PACKAGE MyPackge is
    TYPE cs is REF CURSOR;
    procedure GetList(out_rs out cs);
    END MyPackge;
    /
    create or replace PACKAGE body MyPackge
    is
       procedure   GetList(out_rs out cs)
       is
       begin
            open out_rs for select * from dept;
       end;
    end;
    /
  • yzsind (2008-8-24 13:47:09)

    你的语法等于把包体都放在包定义里去了,包定义结尾少了一个“/”
  • mathli (2008-8-24 21:00:31)

    多谢指点,问题解决了。