How to get record count using reference cursor in oracle10g

青春壹個敷衍的年華 提交于 2019-12-23 02:45:43

问题


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).



来源:https://stackoverflow.com/questions/1062142/how-to-get-record-count-using-reference-cursor-in-oracle10g

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!