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!

Cursor row count problem

Ora_DBAJun 12 2008 — edited Jun 12 2008
Hi,

I am have this code which give rowcount zero from cursor block and the same select statment giving row count if i execute individual. can any one let me know why the row count different. here is simple code

declare
cursor c1 is SELECT * FROM temp_main WHERE status='IN';
vTable_Name varchar2(23);
begin
open c1;
dbms_output.put_line( to_char(c1%rowcount) ||') ' || vTable_Name );
close c1;
end;


Out put of the above code is Zero

2)select * from temp_main where status='IN'


Out put of the above code is 1000

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2008
Added on Jun 12 2008
3 comments
1,227 views