Oracle VARRAY Syntax
SET SERVEROUTPUT ON SIZE 1000000;

DECLARE  
   TYPE va_str IS VARRAY(10) OF VARCHAR2(100);  
   v_str va_str;

BEGIN  
   v_str := va_str(  
  'This','is','a','PL/SQL','VARRAY()','Example');  
 
  FOR idx IN v_str.FIRST..v_str.LAST LOOP  
   DBMS_OUTPUT.PUT_LINE(' Idx['||idx||'] -> '||
      v_str(idx));  
  END LOOP;  
END;  
/

-- Sorting Numbers (VARRAY) - Bubble Sort
Oracle VARRAY() example

Oracle registered trademark of Oracle Corporation.

Last Revised on: March 01, 2012

  1333