René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -

ref cursor from record type [PL/SQL]

create or replace package drop_me_ref_cursor as
  type rec_t is record (a number, b varchar2(10));

  type ref_cur_t is ref cursor return rec_t;

  procedure do (c in ref_cur_t);
end drop_me_ref_cursor;
create or replace package body drop_me_ref_cursor as

  procedure do(c in ref_cur_t) is
    r  rec_t;

    fetch c into r;

      exit when c%notfound;

      fetch c into r;
    end loop;

  end do;

end drop_me_ref_cursor;