Specifying Domain Collation Order
Go Up to Creating Domains (Data Definition Guide)
The COLLATE
clause of CREATE DOMAIN
allows you to specify a particular collation order for columns defined as CHAR
or VARCHAR
text data types. You must choose a collation order that is supported for the column’s given character set. The character set is either the default character set for the entire database, or you can specify a different set in the CHARACTER SET
clause of the data type definition. The collation order set at the column level overrides a collation order set at the domain level.
For a list of the collation orders available for each character set, see Character Sets and Collation Orders.
In the following statement, the domain, TITLE
, overrides the database default character set, specifying a DOS437 character set with a PDOX_INTL collation order:
CREATE DOMAIN TITLE AS
CHAR(50) CHARACTER SET DOS437 COLLATE PDOX_INTL;