Hi Friends,
As mentioned in the subject, PL/SQL Reference guide says that %ISOPEN is always FALSE for implicit cursors.
But does this hold true in case of Implicit Cursors - FOR loop?
For a FOR loop, a cursor is automatically closed when we leave the loop.
So as long as we are in the loop, the cursor will be open and SQL%ISOPEN should return TRUE.But it is returing false as shown below:
BEGIN
FOR i IN (SELECT * FROM scott.emp)
LOOP
IF SQL%ISOPEN THEN
dbms_output.put_line('Empno -> '||i.empno);
ELSE
dbms_output.put_line('Implicit Cursor is CLOSED');
END IF;
END LOOP;
END;
Regards,
Sreekanth Munagala.