Oracle8i and higher supports the following collection data types:

  • VARRAY
  • TABLE
  • OBJECT

The examples in this section are based on the following Create Table and data type definitions:


CREATE TYPE num_varray AS VARRAY(4) OF NUMBER(12,2)
CREATE TYPE num_table AS TABLE of NUMBER(12,2)
CREATE TYPE city_object as OBJECT ( 
   Name VARCHAR2(40),
   Province VARCHAR2(40),
   City_Code VARCHAR2(10),
   Population Number)
CREATE TABLE complex_type_table (array_col num_varray, table_col
num_table, object_col city_object) NESTED TABLE TABLE_COL STORE AS
TABLE_COL_NT