Mega Code Archive

 
Categories / Oracle PLSQL / Cursor
 

Write an explicit cursor in a FOR loop and use the data

SQL> SQL> DECLARE   2    CURSOR c IS SELECT item_title FROM item;   3  BEGIN   4    FOR i IN c LOOP   5      dbms_output.put_line('The title is ['||i.item_title||']');   6    END LOOP;   7  END;   8  /