Reference varchar table by index : Varchar Table « PL SQL « Oracle PL / SQL






Reference varchar table by index

 
SQL>
SQL>  declare
  2      myName dbms_sql.varchar2_table;
  3    begin
  4      myName(1) := 'W';
  5      myName(2) := 'J';
  6      myName(3) := 'C';
  7
  8      for i in 1 .. myName.COUNT loop
  9        dbms_output.put_line('Name (' || i || ') is ' || myName(i));
 10      end loop;
 11    end;
 12    /
Name (1) is W
Name (2) is J
Name (3) is C

PL/SQL procedure successfully completed.

SQL>

           
         
  








Related examples in the same category

1.Table of varchar2: first, next and last
2.table of varchar2(200) index by binary_integer
3.Construct a null element nested table type in the database, then extends it one element at a time.