5.18. CHARACTER SET

5.18.1. ALTER CHARACTER SET

Sets the default collation of a character set

Available inDSQL

Syntax

ALTER CHARACTER SET [cs-schema <period>] charset
  SET DEFAULT COLLATION [col-schema <period>] collation

Table 5.49. ALTER CHARACTER SET Statement Parameters
ParameterDescription

cs-schema

Schema of the character set. If not specified, the character set will be located on the search path. In practice, only SYSTEM has character sets.

charset

Name of the character set

col-schema

Schema of the collation. Firebird-provided collations are in SYSTEM, user-defined collations in user schemas.

collation

Name of the collation

This will affect the future usage of the character set, except for cases where the COLLATE clause is explicitly specified. In that case, the collation of existing domains, columns and PSQL variables will remain intact after the change to the default collation of the underlying character set.

ⓘ
Note

If you change the default collation for the database or schema character set, it will change the default collation for the database or that schema.

If you change the default collation for the character set that was specified during the connection, string constants will be interpreted according to the new collation value, except in those cases where the character set and/or the collation is explicitly specified.

5.18.1.1. Who Can Alter a Character Set

The ALTER CHARACTER SET statement can be executed by:

5.18.1.2. ALTER CHARACTER SET Example

Setting the default UNICODE_CI_AI collation for the UTF8 encoding

ALTER CHARACTER SET UTF8
  SET DEFAULT COLLATION UNICODE_CI_AI;