clear screen
set serveroutput on size 1000000
select * from v$version
declare
type names_aa is table of varchar2(30) index by varchar2(10);
l_names names_aa;
l_indx varchar2(10);
begin
-- fill up the collection
l_names('Hooly') := 'Hooly';
l_names('Heddy') := 'Heddy';
l_names('Hilder') := 'Hilder';
l_names('Holy') := 'Holy';
l_names('Haley') := 'Haley';
-- display the contents of the collection
l_indx := l_names.first;
while l_indx is not null loop
dbms_output.put_line(l_indx || ') ' || l_names(l_indx));
l_indx := l_names.next(l_indx);
end loop;
end;