ALTER SYSTEM FLUSH BUFFER_CACHE;
DECLARE
TYPE big_tab_type IS
TABLE OF scott.big_tab.object_id%TYPE;
mybig_tab big_tab_type;
summe NUMBER := 0;
BEGIN
SELECT
object_id
BULK COLLECT
INTO mybig_tab
FROM
scott.big_tab;
FOR i IN mybig_tab.first..mybig_tab.last LOOP
summe := summe + nvl(mybig_tab(i), 0);
END LOOP;
dbms_output.put_line('Summe=' || summe);
END;
/