Domain Attributes
A domain definition has required and optional attributes.The data type is a required attribute.Optional attributes include:
-
a default value
-
to allow or forbid
NULL
-
CHECK
constraints -
character set (for character data types and text BLOB fields)
-
collation (for character data types)
CREATE DOMAIN BOOL3 AS SMALLINT
CHECK (VALUE IS NULL OR VALUE IN (0, 1));
Explicit Data Type Conversion for the description of differences in the data conversion mechanism when domains are specified for the TYPE OF
and TYPE OF COLUMN
modifiers.