DECLARE
  TYPE moj_typ_tabelowy IS
    TABLE Of emp%ROWTYPE NOT NULL
    INDEX BY BINARY_INTEGER;
  tab moj_typ_tabelowy;
  i INTEGER;
  
  CURSOR e IS
  SELECT * FROM emp;
BEGIN
  i := 0;
  OPEN e;
  LOOP
    i := i + 1;
    FETCH e INTO tab(i);
    EXIT WHEN e%NOTFOUND;
  END LOOP;
  CLOSE e;
END;
/
