Thursday, March 8, 2018

PL/SQL - RETURN MULTIPLE ROWS USING REF CURSOR

DECLARE
    type ref_cursor is ref cursor;
    v_party ref_cursor;
    v_party_name  hz_parties.party_name%type;
BEGIN
    open v_party for select party_name from hz_parties;
    loop
     fetch v_party into v_party_name;
       dbms_output.put_line(v_party_name);
     end loop;
      close v_party;
END;

No comments:

Post a Comment