You can specify the collation for each database when you create the database. The default collation is inferred from the code page and language of the database server's computer's operating system.
For information about using the NCHAR collation, see NCHAR collation.
Run the following command to list the recommended collation sequences:
dbinit -l |
The first column of the list is the collation label, which you supply when creating the database.
Create a database using the dbinit utility, specifying a collation sequence using the -z option. The following command creates a database with a Greek collation.
dbinit -z 1253ELL mydb.db |
The following command creates a case sensitive database, spanish.db, which uses the 1262spa collation for non-NCHAR data. For NCHAR data, the UCA collation is specified, with locale es, and sorting by lowercase first.
dbinit -c -z 1252spa -zn uca(locale=es;case=LowerFirst) spanish.db |
You can use the CREATE DATABASE statement to create a database. The following statement creates a database with a Greek collation:
CREATE DATABASE 'mydb.db' COLLATION '1253ELL'; |
The following statement creates a database using code page 1252 and uses the UCA for both CHAR and NCHAR data types. Accents and case are respected during comparison and sorting.
CREATE DATABASE 'c:\\uca.db' COLLATION 'UCA' ENCODING 'CP1252' NCHAR COLLATION 'UCA' ACCENT RESPECT CASE RESPECT; |
Choose Tools » SQL Anywhere 12 » Create Database.
The Create Database Wizard has a page where you choose a collation from a list.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |