Reference elements in table collection of varchar2 by index : Table Collection Attributes « Collections « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> DECLARE
  2    TYPE CAR_TABLE_TYPE IS TABLE OF VARCHAR2(20);
  3    CAR_TABLE CAR_TABLE_TYPE;
  4  BEGIN
  5    CAR_TABLE := CAR_TABLE_TYPE();
  6    CAR_TABLE.EXTEND(10);
  7    CAR_TABLE(1) := 'DODGE';
  8    CAR_TABLE(2) := 'FORD';
  9    CAR_TABLE(3) := 'MUSTANG';
 10    CAR_TABLE(4) := 'EDSEL';
 11    CAR_TABLE(5) := 'STUDEBAKER';
 12
 13    CAR_TABLE.DELETE(4);
 14    CAR_TABLE(4):= 'ROLLS';
 15
 16  END;
 17  /

PL/SQL procedure successfully completed.

SQL>
SQL>








26.22.Table Collection Attributes
26.22.1.Reference elements in table collection of varchar2 by index
26.22.2.Collection methods: First, Last, Next
26.22.3.Table of numbers: count, last, first
26.22.4.Extend Table collection