You can use the collation=collation and
territory=ll_CC connection URL attributes to specify locale-based
collation (see the for details on
these attributes). This type of collation applies only
to user-defined tables. The system tables use the Unicode codepoint collation.
The collation=collation and
territory=ll_CC attributes can be specified
only when you create a database. You cannot specify these attributes on an existing
database or when you upgrade a database.
To create a database with locale-based collation, specify the
language and country codes for the territory=ll_CC attribute, and the
TERRITORY_BASED value for the collation=collation attribute, when you
create the database.
For example, you could use the following connection URL:
jdbc:derby:MexicanDB;create=true;territory=es_MX;collation=TERRITORY_BASED
See the documentation of the territory=ll_CC and
collation=collation attributes in the
for details on these attributes.
See for
information on making the database use case-insensensitive searches.