Summary of cursor states and attributes v16
The 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 |