Creating a Nested Table Type : Nested Tables « Collections « Oracle PL/SQL Tutorial






You create a nested table type using the CREATE TYPE statement:

If you don't specify the maximum size of a nested table, you can insert any number of elements in a nested table.

SQL> CREATE Or Replace TYPE AddressType AS OBJECT (
  2    street VARCHAR2(15),
  3    city   VARCHAR2(15),
  4    state  CHAR(2),
  5    zip    VARCHAR2(5)
  6  );
  7  /


SQL>
SQL> CREATE Or Replace TYPE nested_table_AddressType AS TABLE OF AddressType;
  2  /

Type created.








26.8.Nested Tables
26.8.1.Nested Tables
26.8.2.Deleting internal elements from a collection
26.8.3.Creating a Nested Table Type
26.8.4.ANSI Support for Nested Tables
26.8.5.Nested type column
26.8.6.Insert value into table with nested type colunm
26.8.7.cardinality
26.8.8.Table with subquery
26.8.9.Type alias for user-defined type in select statement