-- multirow.sql

DECLARE
   TYPE PersonCurTyp IS REF CURSOR;
   person_c   PersonCurTyp;
   person_rec  person%ROWTYPE;
   sql_txt VARCHAR2(200);
BEGIN
   sql_txt := 'SELECT * FROM person WHERE city = :c AND state = :s';
   OPEN person_c FOR sql_txt USING 'Denver', 'CO';
   LOOP
      FETCH person_c INTO person_rec;
      EXIT WHEN person_c%NOTFOUND;
   END LOOP;
   CLOSE person_c;
END;
/