DB2 Version 10.1 for Linux, UNIX, and Windows

FP2: SUBTYPE support added

In DB2® Version 10.1 Fix Pack 2 and later fix packs, a PL/SQL package can include a declaration of a SUBTYPE data type based on an existing built-in data type.

A SUBTYPE is a user-defined data type based on an existing built-in data type. A SUBTYPE is considered to be the same as its source type for all operations, except a SUBTYPE can be defined as not nullable and can apply constraints that limit its values to a specific range. You can use a SUBTYPE to centralize the definition of a particular data type and then use the data type across your code base. The added flexibility to manage the valid values (through data type constraints) adds an extra level of validation to the use of this single data type definition.