SET SERVEROUTPUT ON
DECLARE
  TYPE tbltip IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER;
  tbl tbltip;
  ind BINARY_INTEGER := 1;
BEGIN
  FOR rek IN (SELECT empno FROM EMP WHERE mgr = 7698)
  LOOP
    SELECT * INTO tbl(ind) FROM EMP WHERE empno = rek.empno;
    ind := ind + 1;
  END LOOP;
  ind := tbl.FIRST;
  tbl.DELETE(tbl.LAST);
  LOOP
    DBMS_OUTPUT.PUT_LINE(tbl(ind).ename);
    ind := ind + 1;
  EXIT WHEN ind > tbl.LAST;
  END LOOP;

END;