Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regarding Implicit Cursor

sabi-inAug 19 2010 — edited Aug 23 2010
Hi All,

By default Implicit cursor gets closed after execution of SQL statement.
But after closing of the cursor we can still use the cursor attributes SQL%FOUND,SQL%NOTFOUND,SQL%ROWCOUNT.

This case is not invalid for explicit cursors, SQL%FOUND,SQL%NOTFOUND,SQL%ROWCOUNT are not accessible after closing of the cursor.

But %ISOPEN is different, it is accessible after closing of Implicit or Explicit Cursor.

My Assumptions are:-

In case of Implicit cursor, this is because may be SQL%FOUND,SQL%NOTFOUND,SQL%ROWCOUNT variables are internally defined as global. So these are accessible always.If yes, how oracle is handling %ISOPEN case in explicit cursor.
Explicit cursors are on requirement basis.

Please comment...

Thanks
Sandeep
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 19 2010
3 comments
869 views