Consider the following statement that creates a structured UDT named address :
CREATE TYPE address AS (street VARCHAR(20) ,zip CHAR(5)) NOT FINAL;
The following statement creates a table that defines an address column named location :
CREATE TABLE european_sales (region INTEGER ,location address ,sales DECIMAL(8,2));
The following statement invokes the zip observer method to retrieve the value of each zip attribute in the location column:
SELECT location.zip() FROM european_sales;