CREATE TYPE
The CREATE TYPE statement defines a user-defined data type at the current server.
The following types of user-defined data types can be defined:
- Array
A user-defined data type that is an ordinary array. The elements of an array type are based on one of the built-in data types. See CREATE TYPE (array).
- Distinct
A user-defined data type that shares a common representation with one of the built-in data types.
It can be defined to use strong type rules or weak type
rules.
Functions that cast between the user-defined distinct type and the source built-in data
type are generated when a
strongly typed
distinct type is created. See CREATE TYPE (distinct).