Getting cursor rowcount before fetching?
smonJan 24 2011 — edited Jan 26 2011Just checking if this is do-able? Is there a way to find the total number of rows selected by a cursor after opening it, but before fetching anything?
I know the cursor attribute %rowcount returns the number of records fetched so far (although I don't see this as very useful if there's no way to first find out how many rows there are in total).
From what I've read in the docs it isn't possible, but just checking if anyone has found a way, or there's some deep, hidden, undocumented built-in somewhere that I can probe to get what I want. :o)
After the cursor is opened, the sql has been executed and the result set generated.. I don't see why Oracle couldn't report how many rows are in the result set before all the rows are fetched??
thanks in advance.