User-defined types

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

A user-defined data type is a distinct type or an array type.

A 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.

Start of changeAn array type is a user-defined data type that consists of an ordered set of elements of a single built-in data type. Elements can be accessed and modified by their index position. An array type is created with an SQL CREATE TYPE (array) statement. An array type can be used as a parameter of an SQL routine, as a variable in an SQL routine, and as a global variable.End of change