Keywords: territory=ll_CC database connection URL attribute, Databases, territory, database, Internationalization features

# territory=ll_CC attribute

#### Function

When creating or upgrading a database, use this attribute to associate a non-default territory with the database. Setting the territory attribute overrides the default system territory for that database. The default system territory is found using java.util.Locale.getDefault().

Specify a territory in the form ll_CC, where ll is the two-letter language code, and CC is the two-letter country code.

Language codes consist of a pair of lowercase letters that conform to ISO-639.

Table 1. Sample Language Codes
Language Code | Description
--- | ---
de | German
en | English
es | Spanish
ja | Japanese

To see a full list of ISO-639 codes, go to http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt.

Country codes consist of two uppercase letters that conform to ISO-3166.

Table 1. Sample Country Codes
Country Code | Description
--- | ---
DE | Germany
US | United States
ES | Spain
MX | Mexico
JP | Japan

A copy of ISO-3166 can be found at http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.

#### Combining with other attributes

The territory attribute is used only when creating a database.

In the following example, the new database has a territory of Spanish language and Mexican nationality.

    jdbc:derby:MexicanDB;create=true;territory=es_MX

You can use the `collation` attribute with the `territory` attribute to specify that collation is based on the territory instead of based on Unicode codepoint collation,

Parent topic: Setting attributes for the database connection URL