I want to know how we can get record count using reference cursor in oracle10g.
+1
A:
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).
Thilo
2009-06-30 07:17:54
+2
A:
After you fetched the rows you can use cursorname%rowcount to get the amount of records you fetched.
Donar
2009-06-30 07:35:11
That only returns the number of rows currently fetched, not the number of rows in the entire result set (unless you're at the end of the cursor).
lukef
2009-06-30 07:38:13
he said: After you fetched the rows ...
Thilo
2009-06-30 07:52:17
Thanks donar.cursorname%rowcount works.
Sanjay Thakur
2009-06-30 09:45:07