Re: can a PL/SQL procedure return mul..

From: Sy Jerry <SYJERRY_at_duq3.cc.duq.edu>
Date: 6 Dec 1994 02:29:24 GMT
Message-ID: <3c0ia4$5a6_at_godot.cc.duq.edu>


okay, how then do you return the rows from the cursor outside your begin - end loop, huh ?

Frank Greene (74200.427_at_CompuServe.COM) wrote:
: Isn't this a basic definition of a cursor? For example ---
 

: DECLARE
: CURSOR C1 IS
: SELECT field1, field2
: FROM the_table
: WHERE some_condition_statement;
 

: l_field1 VARCHAR2(10);
: l_field2 VARCHAR2(10);
: BEGIN
: OPEN c1;
: LOOP
: FETCH c1 into l_field1, l_field2;
: exit when c1%notfound;
 

: (do something with each returned record)
: END LOOP;
: CLOSE c1;
: END;
: /
Received on Tue Dec 06 1994 - 03:29:24 CET

Original text of this message