Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Ref Cursors
No, because it is a cursor. Oracle does not retrieve all the results at once, it retrieves them as you ask for them.
Jim
"Steve" <sejohnson_25_at_yahoo.com> wrote in message news:3B8D50D7.51693092_at_yahoo.com...
Is there a way to find out how many rows are going to be returned from a Ref Cursor.
Version Oracle 8.1.7
Here's what I'm trying to do:
FUNCTION test return ref_cursor_def.cursor_type IS
irowcount number;
l_cursor ref_cursor_def.cursor_type;
BEGIN
OPEN l_cursor FOR SELECT custid, mailbox, permission FROM user_profile; irowcount := l_cursor%rowcount;
dbms_output.put_line('Count ' || irowcount);
return(l_cursor);
EXCEPTION WHEN others THEN
dbms_output.put_line('Error ' || irowcount);
END test;
I've also tried SQL%Rowcount which returns null. Metalink shows an example using SQL%rowcount but I couldn't get that to work.
Any help would be appreciated.
Thanks... Received on Wed Aug 29 2001 - 19:38:58 CDT
![]() |
![]() |