It returns the Boolean value TRUE if no rows were processed.
In PL/SQL, the cursor attribute SQL%NOTFOUND
is a boolean attribute that evaluates to TRUE if a cursor fetch returns no rows. It is commonly used to check whether a cursor has reached the end of the result set.
Here’s a brief explanation:
- If
SQL%NOTFOUND
is TRUE, it means that the last fetch did not return any rows, indicating that the cursor has reached the end of the result set or did not find any matching rows. - If
SQL%NOTFOUND
is FALSE, it means that the last fetch did return one or more rows.
This attribute is often used in conjunction with other cursor attributes like SQL%FOUND
and SQL%ROWCOUNT
to handle different scenarios in PL/SQL cursor processing.