I want to know how we can get record count using reference cursor in oracle10g.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
After you fetched the rows you can use cursorname%rowcount to get the amount of records you fetched.
回答2:
You cannot.
You can only count the rows while you fetch them from the cursor.
A cursor is like a stream, and Oracle does not know how much rows are in there until it has read them all (which happens as you fetch rows).