COLLATIONPROPERTY (Transact-SQL)
Collapse the table of content
Expand the table of content

COLLATIONPROPERTY (Transact-SQL)

 

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Returns the property of a specified collation in SQL Server 2016.

Topic link icon Transact-SQL Syntax Conventions

  
COLLATIONPROPERTY( collation_name , property )  

-- Azure SQL Data Warehouse and Parallel Data Warehouse  
COLLATIONPROPERTY(collation_name,property )  

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 nameDescription
CodePageNon-Unicode code page of the collation.
LCIDWindows LCID of the collation.
ComparisonStyleWindows comparison style of the collation. Returns 0 for all binary collations .
VersionThe 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.

sql_variant

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

Here is the result set.

1252   

SELECT COLLATIONPROPERTY('Traditional_Spanish_CS_AS_KS_WS', 'CodePage')  

Here is the result set.

1252   

sys.fn_helpcollations (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft