Write an explicit cursor in a FOR loop and use the data : Explicit Cursor « Cursor « Oracle PL / SQL






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  /

   
    
  








Related examples in the same category

1.Explicit Cursor Demo
2.Implicit and Explicit Cursors
3.an explicit cursor that selects data
4.An explicit cursor fetch loop.
5.Use cursor to store the row count
6.Column value indexed cursor
7.Combine for loop and if statement to check the value in cursor
8.Cursor performance
9.Delete from table where current of cursor
10.If statement and single piece value in cursor
11.Use explicit cursor to fetch and store value to number variable