how do you read the result set

From: dmarsha3 <dmarsha3_at_csc.com>
Date: 1997/09/02
Message-ID: <5uh1j2$ae4_at_explorer.csc.com>#1/1


To:
From: dmarsha3_at_csc.com (dmarsha3)
Subject: How to read the result set
Organization: Computer Sciences Corp
Date: Tue, 02 Sep 97 09:06:38 EST
Reply-To: kramakri_at_.csc.com
X-Mailer: WinVN 0.92.6+

I had seen this piece of code and I am not sure how do you read the result set.

create or replace package test1 as
depttyp dept%rowtype;
cursor c_dept return dept%rowtype;
function f_dept return depttyp;
end;
/

create or replace package body test1 as
v_typ dept%rowtype;
cursor c_dept return dept%rowtype is select * from dept; function f_dept return depttyp is
begin
open c_dept;
for i in c_dept loop
fetch c_dept into v_typ;
exit when c_dept%notfound;
end loop;
close c_dept;
return v_typ;
end;
end;
/

I would appreciate If somebody could explain how do you read the multiple record result set

Any help is appreciated.

Thanks in advance

Rama Received on Tue Sep 02 1997 - 00:00:00 CEST

Original text of this message