Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » International Languages and Character Sets » International language and character set tasks

Determining the default collation Next Page

Determining locale information


You can determine locale information using functions such as PROPERTY, DB_PROPERTY, and CONNECTION_PROPERTY. The following table shows how to use these functions to return locale information about the client connection, database, and database server.

System function and parameterReturn value
SELECT PROPERTY( 'CharSet' ); Character set of the database server. Usually the character set of the computer hosting the server.
SELECT PROPERTY( 'DefaultCollation' ); Default CHAR collation used by the database server for creating databases.
SELECT PROPERTY( 'DefaultNcharCollation' ); Default NCHAR collation used by the database server for creating databases.
SELECT PROPERTY( 'Language' ); Language used by server console.
SELECT DB_PROPERTY( 'CharSet' ); Character set used to store CHAR data in the database.
SELECT DB_PROPERTY( 'NcharCharSet' ); Character set used to store NCHAR data in the database.
SELECT DB_PROPERTY( 'MultiByteCharSet' ); Whether CHAR data uses a multibyte character set (On=yes, Off=no).
SELECT DB_PROPERTY( 'Language' ); Comma-separated list of two-letter codes representing the languages supported by database CHAR collation.
SELECT DB_PROPERTY( 'Collation' ); CHAR collation name in use by the database server.
SELECT DB_PROPERTY( 'NcharCollation' ); NCHAR collation name in use by the database server.
SELECT CONNECTION_PROPERTY( 'CharSet' ); Client's CHAR data character set.
SELECT CONNECTION_PROPERTY( 'NcharCharSet' ); Character set of NCHAR data for the connection.
SELECT CONNECTION_PROPERTY( 'Language' ); Client language for the connection.
See also