SQL> select count(*) from t;
COUNT(*)
----------
536
SQL> declare
2 cursor c_t is select * from
t;
3 type typ_t is table of
c_t%rowtype
4 index by
binary_integer;
5 v_type_t
typ_t;
6 v_row
pls_integer;
7 begin
8 open
c_t;
9 loop
10 fetch c_t bulk collect into v_type_t
11 limit 100;
12 exit when v_type_t.count = 0;
13 dbms_output.put_line(v_type_t.count);
14 v_row :=v_type_t.first;
15 while(v_row is not null)
16 loop
17 --
dbms_output.put_line(v_type_t(v_row).empno);
18 null;
19 v_row
:=v_type_t.next(v_row);
20 end loop;
21 end loop;
22 close c_t;
23 end;
24 /
100
100
100
100
100
36
PL/SQL procedure successfully
completed.