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!

Ref cursor returns one row lesser while using fetch.

2745693Sep 4 2014 — edited Sep 10 2014

Hi all,

I have opened a ref cursor for a select statement and then fetched it to check data found or not and then returned that ref cursor.In the result i am getting one row lesser.

Without fetch all the rows are returned. The issue is with the fetch only. Please help me to check no record found in the ref cursor without using fetch.

Open refcusrsor1 for select name from proj1

fetch refcursor1 into var1

if var1%notfound then

...

Else

...

End if

return.

If we use the fetch, the first row is not getting returned in the procedure. without fetch all the rows returned.


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2014
Added on Sep 4 2014
15 comments
4,864 views