方法一: Package 和 Procedure 的做法

先创建一个返回结果集的游标:

create or replace package pkgaccq_tbuserpr
is
type result is ref cursor;
end pkgaccq_tbuserpr;

用上面定义的结果集来乘放抛出的结果结:

create or replace procedure praccq_tbuserpr
(
cresult in out pkgaccq_tbuserpr.result       ------引用定义的package cursor
)
is
begin
open cresult for
select * from tb_color;
end praccq_tbuserpr;

方法一: Package 和 Package Body 的做法

Package :

create or replace package pgaccq_tbuser is
---public type declaration
type result is ref cursor;
procedure prq_tb_user(ocur_result in out result);
end pgaccq_tbuser;

Package  Body:

create or replace package body pgaccq_tbuser is
procedure prq_tb_user(ocur_result in out result)
is
begin
open ocur_result for
select * from tb_user;
end prq_tb_user;
end pgaccq_tbuser;

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zwxrain/archive/2006/10/26/1351614.aspx

相关文章:

  • 2021-09-23
  • 2021-04-25
  • 2021-12-27
  • 2021-11-27
  • 2022-02-23
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案