Localized order
Localized order is an order of the characters that relates to a natural language. The locale defines the order of the characters in the localized order.
For example, even though the character À
might
have a code point of 133, the localized order can list this character
after A
and before B
(A
=65, À
=133, B
=66).
In this case, the string B
sorts after AC
but
before BD
.
- NCHAR
- NVARCHAR
Arizona
, ARIZONA
,
and arizona
are collated together, as if all three
strings were the same string. Mabin
McDonald
MacDonald
Madden
Mabin
Madden
MacDonald
McDonald
If the GLS locale defines a localized order, the database server sorts data from NCHAR and NVARCHAR columns in this localized order. For an example of data sorted in a localized order, see Data set for localized order of the abonnés table.
HCL OneDB™ supports the SET COLLATION statement, which can specify a localized collation different from the DB_LOCALE setting. The scope of the non-default collating order is the current session, but database objects that perform collation, such as indexes or triggers, use the collating order from the time of their creation when they sort NCHAR or NVARCHAR values.
After the SET COLLATION statement has specified a localized collation order, and you have completed all of the sorting tasks that require that localized order, you can restore the collation that the DB_LOCALE setting implies by issuing the SET NO COLLATION statement of SQL.
The SET COLLATION statement only affects localized collation operations that the database server performs. Sorting of NCHAR or NVARCHAR data values by the client always follows the collation order of the CLIENT_LOCALE setting, and ignores any SET COLLATION specifications. For more information about the environment variables that can define the client locale or the server locale, see Locales in the client/server environment.