Collection Methods : Varray Methods « Collections « Oracle PL/SQL Tutorial






SQL> -- EXISTS
SQL> DECLARE
  2    TYPE numberVarray IS VARRAY(5)OF NUMBER;
  3
  4    v_numarray numberVarray :=numberVarray(10,20,30,40,50);
  5
  6  BEGIN
  7
  8    IF v_numarray.EXISTS(4) THEN
  9
 10      DBMS_OUTPUT.PUT_LINE('The element 4 exists in the variable array.');
 11
 12    END IF;
 13
 14  END;
 15  /
The element 4 exists in the variable array.

PL/SQL procedure successfully completed.

SQL>
SQL>








26.5.Varray Methods
26.5.1.Collection Methods
26.5.2.Extend and count attributes of varray
26.5.3.COUNT
26.5.4.LIMIT
26.5.5.EXTEND