Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Cursor
 

%ISOPEN, %FOUND, %NOTFOUND variables arent useful at all in CURSOR FOR loops

The CURSOR FOR loop is always closed before and after the loop and open inside the loop. There is no reason to ever use %ISOPEN. Inside the loop, records are always found, so %FOUND is always true inside the loop. Outside the loop, %FOUND, %NOT FOUND would return an error.