Method 1: Package and procedure
First, create a cursor for the returned result set:
Create or replace package pkgaccq_tbuserpr
Is
Type result is ref cursor;
End pkgaccq_tbuserpr;
Use the result set defined above to multiply and put the result knot thrown:
Create or replace procedure praccq_tbuserpr
(
Cresult in out pkgaccq_tbuserpr.result ------ reference the defined package cursor
)
Is
Begin
Open cresult
Select * From tb_color;
End praccq_tbuserpr;
Method 1: Package and 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
Select * From tb_user;
End prq_tb_user;
End pgaccq_tbuser;
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/zwxrain/archive/2006/10/26/1351614.aspx