Share via


COLLATIONPROPERTY (Transact-SQL)

Returns the property of a specified collation.

Topic link iconTransact-SQL Syntax Conventions

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. All new collation versions introduced in SQL Server 2005 return 1. All other collations, introduced in earlier versions of SQL Server, are version 0.

Return Types

sql_variant

Examples

SELECT COLLATIONPROPERTY('Traditional_Spanish_CS_AS_KS_WS', 'CodePage')

Here is the result set.

1252 

See Also

Reference

fn_helpcollations (Transact-SQL)

Other Resources

Collation Types
Collation and Code Page Architecture

Help and Information

Getting SQL Server 2005 Assistance