COLLATIONPROPERTY function returns property of a given collation.
It is a nondeterministic i.e It returns different value every time it is called with a specific set of values.
Syntax of COLLATIONPROPERTY Function :
COLLATIONPROPERTY (collation_name, property )
collation_name is a name of collation. It is of type nvarchar(128).
property is a property of a collation.It is of type varchar(128). It can be of below values:
Property Name | Description |
CodePage | The nonUnicode code page of the collation. |
LCID | The Windows LCID of the collation.
Returns NULL for SQL collations. |
ComparisonStyle | The Windows comparison style of the collation.
Returns NULL for binary or SQL collations. |
Return type of COLLATION PROPERTY function is a sql_variant.
Examples of COLLATIONPROPERTY Function :
Example 1 : Use of COLLATIONPROPERTY function in select clause
SELECT COLLATIONPROPERTY ('Albanian_BIN', 'LCID')
Output
1052
Above example returns LCID of specified collation property.