CREATE DISTINCT TYPE

The CREATE DISTINCT TYPE statement creates a distinct type. The distinct type is always sourced from one of the built-in data types. For a listing of data types, see Data types

Example:

Create a distinct type named SHOESIZE that is sourced on an INTEGER data type.

CREATE DISTINCT TYPE SHOESIZE 
    AS INTEGER

The successful execution of this statement also generates two cast functions. Function INTEGER(SHOESIZE) returns a value with data type INTEGER, and function SHOESIZE(INTEGER) returns a value with distinct type SHOESIZE.

For more information, see CREATE DISTINCT TYPE in the SQL Reference topic in the Information CenterLink to Information center.