|
-
create or replace package pk1 as
type t1 is ref cursor;
procedure p1( x out t1);
end pk1;
/
create or replace package body pk1 as
procedure p1 (x out t1) as
begin
open x for select * from emp;
end p1;
end pk1;
set serverout on
declare
a emp%rowtype;
c pk1.t1;
begin
pk1.p1(c);
loop
fetch c into a;
exit when c%NOTFOUND;
dbms_output.put_line( a.ename||' '||a.sal||' '||a.empno);
end loop;
end;
/
Cheers
Slash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|