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!

SELECT INTO or a Cursor Fetch

570901Apr 23 2007 — edited Apr 24 2007
When I create a function that only queries one row and returns a value, is it better
to declare a cursor and in then open it and fetch the row in the executable section.
or
just do a SELECT ... INTO in the executable section.

just wondering. I usually do SELECT INTO, but another developer here does declares the cursor.

my guess is declare the cursor, because it is closed after the its used.
and who knows what happens to the SELECT INTO when in it is finished.

Anyone?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2007
Added on Apr 23 2007
8 comments
1,636 views