Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Security FunctionsRSS Feeds

COLLATIONPROPERTY Function

Posted By: Sarita Patel     Category: SQL Server     Views: 2780

This article explains about COLLATIONPROPERTY function in sql server with examples.

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_nameproperty )
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.
  
Share: 

 
 

Didn't find what you were looking for? Find more on COLLATIONPROPERTY Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of COLLATIONPROPERTY Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!