explicit cursor with cursor variable : Explicit Cursor « Cursor « Oracle PL/SQL Tutorial






SQL>
SQL> create table myTable (x primary key) organization index as select 1 from dual;

Table created.

SQL>
SQL>
SQL>
SQL>
SQL> create or replace procedure explicit is
  2    cursor explicit_cur is select 1 from myTable;
  3    dummy number;
  4  begin
  5    for i in 1 .. 500 loop
  6       open explicit_cur;
  7       fetch explicit_cur
  8       into dummy;
  9       close explicit_cur;
 10    end loop;
 11  end;
 12  /

Procedure created.

SQL>
SQL>
SQL> drop table myTable;

Table dropped.








25.9.Explicit Cursor
25.9.1.Use explicit cursor to fetch and store value to number variable
25.9.2.explicit cursor with cursor variable