This Oracle tutorial explains how to use the Oracle/PLSQL OPEN statement with syntax and examples.
Once you've declared your cursor, the next step is to use the OPEN statement to open the cursor.
The syntax to open a cursor using the OPEN statement in Oracle/PLSQL is:
Parameters or Arguments
The name of the cursor that you wish to open.
For example, you could open a cursor called c1 with the following command:
Below is a function that demonstrates how to use the OPEN statement:
CREATE OR REPLACE Function FindCourse
( name_in IN varchar2 )
WHERE course_name = name_in;
FETCH c1 INTO cnumber;
if c1%notfound then
cnumber := 9999;