Summary of Cursor States and Attributes v13
The following table summarizes the possible cursor states and the values returned by the cursor attributes.
Cursor State | %ISOPEN | %FOUND | %NOTFOUND | %ROWCOUNT |
---|---|---|---|---|
Before OPEN | False | INVALID_CURSOR Exception | INVALID_CURSOR Exception | INVALID_CURSOR Exception |
After OPEN & Before 1st FETCH | True | Null | Null | 0 |
After 1st Successful FETCH | True | True | False | 1 |
After nth Successful FETCH (last row) | True | True | False | n |
After n+1st FETCH (after last row) | True | False | True | n |
After CLOSE | False | INVALID_CURSOR Exception | INVALID_CURSOR Exception | INVALID_CURSOR Exception |