Search notes:
Oracle: DBMS_SQL.FETCH_ROWS
dbms_sql.fetch_rows
must be called repeatedly to fetch all rows from a select statement.
The function returns the actual number of rows that were fetched.
…
while dbms_sql.fetch_rows(cur) > 0 loop
…
end loop;
…
Return value
The returned value corresponds to the number of records fetched.
When using
define_array
, a call to
fetch_rows
returns multiple rows .
When no more rows can be fetched, the function returns 0.