create or replace package tt is type rtCur is ref cursor ; end tt; / CREATE OR REPLACE Procedure aaa ( aa Out tt.rtCur ) Is Begin Open aa For Select * From User_Tables; End; / create or replace procedure aaaa Is ssd tt.rtCur; ss Varchar2(2000); files utl_file.file_type; beginaaa(ssd);
files := utl_file.fopen('/export/home/app/oracle/product/9i' ,'hello.txt','w');loop fetch ssd into ss; utl_file.put_line(files,ss); exit when ssd%notfound; end loop; utl_file.fclose(files); end aaaa; /
type rtCur is ref cursor ;
end tt;
/
CREATE OR REPLACE Procedure aaa
(
aa Out tt.rtCur
)
Is
Begin
Open aa For Select * From User_Tables;
End;
/
create or replace procedure aaaa Is
ssd tt.rtCur;
ss Varchar2(2000);
files utl_file.file_type;
beginaaa(ssd);
files := utl_file.fopen('/export/home/app/oracle/product/9i' ,'hello.txt','w');loop
fetch ssd into ss;
utl_file.put_line(files,ss);
exit when ssd%notfound;
end loop;
utl_file.fclose(files);
end aaaa;
/