Before a cursor can be used to retrieve rows, it must first be opened.
This is accomplished with the OPEN statement.
name is the identifier of a cursor that has been previously declared in the declaration topic of the SPL program. The OPEN statement must not be executed on a cursor that has already been and still is open.
The following code shows an OPEN statement with its corresponding cursor declaration:
CREATE OR REPLACE PROCEDURE cursor_example IS CURSOR emp_cur_3 IS SELECT empno, ename FROM emp WHERE deptno = 10 ORDER BY empno; BEGIN OPEN emp_cur_3; ... END;