COLLATIONPROPERTY#

Returns the property of a specified collation.

Syntax#

COLLATIONPROPERTY( collation_name, property )

Arguments#

collation_name

Is the name of the collation. collation_name is nvarchar(128), and has no default.

property

Is the property of the collation. property is varchar(128), and can be any one of the following values:

Property name

Description

CodePage

Non=Unicode code page of the collation.

LCID

Windows LCID of the collation.

ComparisonStyle

Windows comparison style of the collation. Returns 0 for all binary collations.

Version

The version of the collation, derived from the version field of the collation ID. Returns 2, 1, or 0. Collations with “100” in the name return 2. Collations with “90” in the name return 1. All other collations return 0.

CollationID

ID of the collation.

Return types#

sql_variant

Example#

SELECT COLLATIONPROPERTY('SQL_Polish_Cp1250_CI_AS_KI_WI', 'CodePage');

See Also#