Question: pl sql exit when notfound?
Answer: EXIT WHEN c1%NOTFOUND OR c1%NOTFOUND IS NULL; You can use the cursor attributes in procedural statements but not in SQL statements. This PL/SQL block uses %FOUND to select an action. Instead of using %FOUND in an IF statement, the next example uses %NOTFOUND in an EXIT WHEN statement.