User-defined distinct types

A user-defined distinct type (UDT) allows the Db2® for i built-in data types to be reused for more specific purposes.

There are two types of UDTs.
  1. Strongly typed UDTs

    These UDTs are considered to be a data type that is distinct from every other data type on the system. The assignment and comparison rules require casting values from and to the strongly typed UDT.

  2. Start of changeWeakly typed UDTs

    These UDTs are considered to be identical to their base data type. All normal assignments, comparisons, and functions are supported for weakly typed UDTs.

    A Weakly typed UDT is the recommended option for most applications. It is very easy to modify existing objects to use a weak type instead of a system provided data type. For example, a table can be altered to use weak types for its columns. This modification requires no changes to the application code or any SQL statement that references the columns.

    End of change

Tables with columns defined as user-defined types are not supported for native database access.