Oracle PL/SQL - Explicit Cursor Attributes

Introduction

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

For example

c1%ISOPEN 

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