User-defined types

A user-defined type is a data type that is defined to the database using a CREATE statement.

Start of changeThere are two types of user-defined data type:End of change

Start of changeEnd of change

Start of changeA distinct type is a user-defined type that shares its internal representation with a built-in data type (its source type), but is considered to be a separate and incompatible data type for most operations. A distinct type is created with an SQL CREATE TYPE (Distinct) statement. A distinct type can be used to define a column of a table, or a parameter of a routine. For more information, see CREATE TYPE (Distinct) and User-defined types.End of change

Start of changeAn array type is a user-defined type that defines a one column array of a built-in data type. An array type is created with an SQL CREATE TYPE (Array) statement. An array type can be used as a parameter of a procedure and as a variable in an SQL procedure. For more information, see CREATE TYPE (Array) and User-defined types.End of change