Skip to Main Content

Database Software

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!

add FINALLY key word

TPD-OpitzApr 28 2016

I often face the problem that I Open a cursor and this could fail (e.g. with no rows returned)

But I'd lke the close of this cursor to be executed any way.

Currently I have to write the close statement twice: once in the "happy path" and again in the EXCEPTION block. This also implies that I need an exception bblock just for closing the cursor.

Please add the FINALLY key word.

Allow the FINALLY key word in front of a single statement to ensure that this statement is executed even when an exception occured before within this procedure/function. This may be coupled with the CLOSE key word.

Multiple FINALY (CLOSE) statements should be allowed within a block.

Alternatively add the FINALLY keyword as a part of an PL/SQL block just like EXCEPTION where I can place statements that should be executed even if an exception has been raised

bye

TPD

Comments

Post Details

Added on Apr 28 2016
23 comments
1,218 views