SQL> create or replace type addressType as object
2 (
3 Street VARCHAR2(50),
4 City VARCHAR2(25),
5 State CHAR(2),
6 Zip NUMBER
7 );
8 /
SQL> create or replace type personType as object
2 (
3 Name VARCHAR2(25),
4 Address addressType
5 );
6 /
SQL> create table CUSTOMER
2 (
3 cid NUMBER,
4 Person personType
5 );
SQL>
SQL> insert into CUSTOMER values(444, personType('Name',addressType('1 RD', 'Van', 'MA', '10002')));
SQL>
SQL>
SQL> drop table customer;
SQL> drop type personType;
SQL> drop type addressType;
SQL>