Defining types with structured type attributes
A type can be created with a structured type attribute, or it can be altered (before it is used) to add or drop such an attribute.
About this task
For example, the following CREATE TYPE statement contains
an attribute of type Address_t
:
CREATE TYPE Person_t AS
(Name VARCHAR(20),
Age INT,
Address Address_t)
REF USING VARCHAR(13)
MODE DB2SQL;
Person_t
can be
used as the type of a table, the type of a column in a regular table,
or as an attribute of another structured type.