-----建立一个带游标的包 drop package mypackage
create or replace package mypackage as
type test_cursor is ref cursor;
end mypackage;
----创建一个带输出结果集的存储过程(使用包的游标) drop procedure myprocedurecreate or replace procedure myprocedure (p_cursor out mypackage.test_cursor ) is
begin
open p_cursor for select * form test;
end;PACKAGE mypackage 已编译
PROCEDURE myprocedure 已编译
Warning: 执行完毕, 但带有警告
在行 42 上开始执行命令时出错:
exec myprocedure
错误报告:
ORA-06550: 第 1 行, 第 7 列:
PLS-00905: 对象 SYSTEM.MYPROCEDURE 无效
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
create or replace package mypackage as
type test_cursor is ref cursor;
end mypackage;
----创建一个带输出结果集的存储过程(使用包的游标) drop procedure myprocedurecreate or replace procedure myprocedure (p_cursor out mypackage.test_cursor ) is
begin
open p_cursor for select * form test;
end;PACKAGE mypackage 已编译
PROCEDURE myprocedure 已编译
Warning: 执行完毕, 但带有警告
在行 42 上开始执行命令时出错:
exec myprocedure
错误报告:
ORA-06550: 第 1 行, 第 7 列:
PLS-00905: 对象 SYSTEM.MYPROCEDURE 无效
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货