DECLARE
CURSOR c IS
SELECT
*
FROM
scott.emp;
TYPE emp_tab_type IS
TABLE OF c%rowtype;
emp_tab emp_tab_type;
BEGIN
OPEN c;
LOOP
FETCH c
BULK COLLECT INTO emp_tab LIMIT 5;
FOR i IN 1..emp_tab.count LOOP
dbms_output.put_line('Zeile='
|| i
|| ' Name='
|| emp_tab(i).ename);
END LOOP;
EXIT WHEN c%notfound;
END LOOP;
CLOSE c;
END;
/