Thursday, March 8, 2018

PL/SQL - SELECT multiple row

DECLARE
      CURSOR  hzp_cur IS
        SELECT party_id, party_name
        FROM hz_parties;
BEGIN
     FOR i IN hzp_cur
     LOOP
       DBMS_OUTPUT.PUT_LINE ('party_id: '||i.party_id);
       DBMS_OUTPUT.PUT_LINE ('party_name: '||i.party_name);
     
     END LOOP;
END;

No comments:

Post a Comment