Oracle PL/SQL - Explicit Cursor Attributes


The syntax for an explicit cursor attribute is cursor_name immediately followed by attribute.

For example


Explicit cursors and cursor variables, named cursors, have the same attributes.

The explicit cursor attributes are:

Attribute Description
%ISOPEN Is the Cursor Open?
%FOUND Has a Row Been Fetched?
%NOTFOUND Has No Row Been Fetched?
%ROWCOUNT How Many Rows Were Fetched?

If an explicit cursor is not open, referencing any attribute except %ISOPEN raises the predefined exception INVALID_CURSOR.

Related Topics