How to get record count using reference cursor in

2019-06-04 00:22发布

I want to know how we can get record count using reference cursor in oracle10g.

2条回答
太酷不给撩
2楼-- · 2019-06-04 01:00

After you fetched the rows you can use cursorname%rowcount to get the amount of records you fetched.

查看更多
beautiful°
3楼-- · 2019-06-04 01:17

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

查看更多
登录 后发表回答