Citation:
The following example creates a multilevel collection type that is a nested table of nested tables. The example models a system of stars in which each star has a nested table collection of the planets revolving around it, and each planet has a nested table collection of its satellites.
CREATE TYPE satellite_t AS OBJECT (
name VARCHAR2(20),
diameter NUMBER);
CREATE TYPE nt_sat_t AS TABLE OF satellite_t;
CREATE TYPE planet_t AS OBJECT (
name VARCHAR2(20),
mass NUMBER,
satellites nt_sat_t);
CREATE TYPE nt_pl_t AS TABLE OF planet_t;