33 of 62
Nested Tables -  Example 1
udeclare
u    type month_nt is table of VARCHAR2(20);
u    v_month_nt month_nt:=month_nt();
u    i number;
ubegin
u    v_month_nt.extend(3);
u    v_month_nt(1):='January';
u    v_month_nt(2):='February';    
u    v_month_nt(3):='March';    
u    v_month_nt.delete(2);   
u    DBMS_OUTPUT.put_line('Count:'||v_month_nt.count);
u    DBMS_OUTPUT.put_line('Last:'||v_month_nt.last);    
u    i:=v_month_nt.first;
u    loop
u        DBMS_OUTPUT.put_line(v_month_nt(i));
u        i:=v_month_nt.next(i);
u        if i is null then exit;
u        end if;       
u    end loop;
uend;