%NOTFOUND v13
The %NOTFOUND
attribute is the logical opposite of %FOUND
.
cursor_name
is the name of the cursor for which a BOOLEAN
data type of FALSE
will be returned if a row is retrieved from the result set of the cursor after a FETCH
.
After the last row of the result set has been fetched the next FETCH
results in %NOTFOUND
returning TRUE
. TRUE
is also returned after the first FETCH
if there are no rows in the result set to begin with.
Referencing %NOTFOUND
on a cursor before it is opened or after it is closed, results in an INVALID_CURSOR
exception being thrown.
%NOTFOUND
returns null
if it is referenced when the cursor is open, but before the first FETCH
.
The following example uses %NOTFOUND
.
Similar to the prior example, this procedure produces the same output when invoked.