By below code is not working for cursor on PLSQL. I receive an error message.
declare
type abc is varray(10) of number;
cursor x is select Empno from emp where rownum <10;
a abc;
counter number :=1;
begin
a:=abc();
for i in x
loop
a.extend();
a(i):=counter.Empno;
DBMS_output.put_line(a(i));
counter:= end loop;
end;