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 » Database Options » Introduction to database options » Alphabetical list of options

secure_feature_key [database] Next Page

sort_collation option [database]


Allows implicit use of the SORTKEY function on ORDER BY expressions.

Allowed values

Internal, collation_name, or collation_id

Default

Internal

Remarks

When the value of this option is Internal, the ORDER BY clause remains unchanged.

When the value of this option is set to a valid collation name or collation ID, any string expression in the ORDER BY clause is treated as if the SORTKEY function had been invoked.

See also
Example

Set the sort collation to binary:

SET TEMPORARY OPTION sort_collation='binary';

Having the sort collation set to binary transforms the following queries:

SELECT Name, ID
FROM Products
ORDER BY Name, ID;
SELECT name, ID
FROM Products
ORDER BY 1, 2;

The queries are transformed into:

SELECT Name, ID
FROM Products
ORDER BY SORTKEY(Name, 'binary'), ID;