Written a PL/SQL loop, you need to test if the current FETCH was successful. Which SQL cursor attribute would you use to accomplish this task?
A: SQL%ISOPEN
B: SQL%ROWCOUNT
C: SQL%FOUND
D: This task cannot be accomplished with a SQL cursor attribute.
E: A SQL cursor attribute cannot be used within a PL/SQL loop.
ANSWER: C
EXPLANATION: Answer C is correct because of SQL%FOUND attribute returns TRUE if current FETCH have been successful.
INCORRECT ANSWERS:
A: SQL%ISOPEN attribute returns TRUE if cursor is OPEN and ready for use.
B: SQL%ROWCOUNT returns the number of rows that were processed by the statement.
D: This task can be successfully accomplished with a SQL%FOUND cursor attribute.
E: PL/SQL loop can contain a SQL cursor attribute.