Code set and collation combinations
The code set and collating sequence used by a database is based on the locale, code set , and collating sequence specified when the database is created.
The following table lists all possible combinations of locale, code set, and collating sequence specified when a database is created. If the code set or collating sequence was not specified when the database was created, the default collating sequence is used.
In the Specified collation and Collation used by database columns, X represents for any collation mechanism allowed for the given code set. "Language aware" represents a collation based on the SYSTEM_codepage_territory format, for both Unicode and non-Unicode databases.
Client locale | Specified code set | Specified collation | Code set used by database | Collation used by database |
---|---|---|---|---|
Non-Unicode | Unspecified | SYSTEM | Unicode | Language aware |
Non-Unicode | Non-Unicode | SYSTEM | Non-Unicode | Language aware |
Non-Unicode | Unspecified | X | This combination is not allowed and results in error message SQL1083N. | |
Non-Unicode | Non-Unicode | X | Non-Unicode | X |
Non-Unicode | Unicode | SYSTEM | Unicode | IDENTITY |
Non-Unicode | Unicode | X | Unicode | X |
Unicode | Unspecified | SYSTEM | Unicode | IDENTITY |
Unicode | Non-Unicode | SYSTEM | Non-Unicode | Language aware |
Unicode | Unspecified | X | Unicode | X |
Unicode | Non-Unicode | X | Non-Unicode | X |
Unicode | Unicode | SYSTEM | Unicode | IDENTITY |
Unicode | Unicode | X | Unicode | X |
For example, if
- the client locale is a non-Unicode locale, such as pt_BR
- the code set was not specified at database creation
- the SYSTEM collation was specified at database creation
- the Unicode code set
- a SYSTEM_codepage_territory collation, such as SYSTEM_819_BR.