Row Count of a REF CURSOR
FlakeNov 26 2007 — edited Nov 26 2007Consider the following PL/SQL:
TYPE ref_cursor IS REF CURSOR;
l_row_count NUMBER := 0;
l_cursor ref_cursor;
OPEN l_cursor FOR 'SELECT * FROM user_tables';
l_row_count := l_cursor%ROWCOUNT;
Will "l_row_count" contain the number of row in "l_cursor"? I tried a simple procedure.
Though it is not returning any error, the row count is shown as "0" though there were
rows in the table. Or am I doing incorrectly? Suggests are welcome.
Thank you.