|Oracle® Database PL/SQL User's Guide and Reference
10g Release 2 (10.2)
|PDF · Mobi · ePub|
cursor_name, cursor_variable_name, host_cursor_variable_name
When you close the cursor, you can specify an explicit cursor or a PL/SQL cursor variable, previously declared within the current scope and currently open.
You can also specify a cursor variable declared in a PL/SQL host environment and passed to PL/SQL as a bind variable. The datatype of the host cursor variable is compatible with the return type of any PL/SQL cursor variable. Host variables must be prefixed with a colon.
Once a cursor or cursor variable is closed, you can reopen it using the
OPEN-FOR statement, respectively. You must close a cursor before opening it again, otherwise PL/SQL raises the predefined exception
CURSOR_ALREADY_OPEN. You do not need to close a cursor variable before opening it again.
If you try to close an already-closed or never-opened cursor or cursor variable, PL/SQL raises the predefined exception
For examples, see the following: