| title | SQL Server Collation Name (Transact-SQL) | Microsoft Docs | |||
|---|---|---|---|---|
| ms.custom | ||||
| ms.date | 05/11/2017 | |||
| ms.prod | sql-non-specified | |||
| ms.reviewer | ||||
| ms.suite | ||||
| ms.technology |
|
|||
| ms.tgt_pltfrm | ||||
| ms.topic | language-reference | |||
| dev_langs |
|
|||
| helpviewer_keywords |
|
|||
| ms.assetid | 56483d24-add7-483d-9b96-c6fda460ddbc | |||
| caps.latest.revision | 30 | |||
| author | edmacauley | |||
| ms.author | edmaca | |||
| manager | cguyer | |||
| ms.workload | On Demand |
[!INCLUDEtsql-appliesto-ss2008-all_md]
Is a single string that specifies the collation name for a [!INCLUDEssNoVersion] collation.
[!INCLUDEssNoVersion] supports Windows collations. [!INCLUDEssNoVersion] also supports a limited number (<80) of collations called [!INCLUDEssNoVersion] collations which were developed before [!INCLUDEssNoVersion] supported Windows collations. [!INCLUDEssNoVersion] collations are still supported for backward compatibility, but should not be used for new development work. For more information about Windows collations, see Windows Collation Name (Transact-SQL).
Transact-SQL Syntax Conventions
<SQL_collation_name> :: =
SQL_SortRules[_Pref]_CPCodepage_<ComparisonStyle>
<ComparisonStyle> ::=
_CaseSensitivity_AccentSensitivity | _BIN
SortRules
A string identifying the alphabet or language whose sorting rules are applied when dictionary sorting is specified. Examples are Latin1_General or Polish.
Pref
Specifies uppercase preference. Even if comparison is case-insensitive, the uppercase version of a letter sorts before the lowercase version, when there is no other distinction.
Codepage
Specifies a one- to four-digit number that identifies the code page used by the collation. CP1 specifies code page 1252, for all other code pages the complete code page number is specified. For example, CP1251 specifies code page 1251 and CP850 specifies code page 850.
CaseSensitivity
CI specifies case-insensitive, CS specifies case-sensitive.
AccentSensitivity
AI specifies accent-insensitive, AS specifies accent-sensitive.
BIN
Specifies the binary sort order to be used.
To list the [!INCLUDEssNoVersion] collations supported by your server, execute the following query.
SELECT * FROM sys.fn_helpcollations()
WHERE name LIKE 'SQL%';
Note
For Sort Order ID 80, use any of the Window collations with the code page of 1250, and binary order. For example: Albanian_BIN, Croatian_BIN, Czech_BIN, Romanian_BIN, Slovak_BIN, Slovenian_BIN.
ALTER TABLE (Transact-SQL)
Constants (Transact-SQL)
CREATE DATABASE (SQL Server Transact-SQL)
CREATE TABLE (Transact-SQL)
DECLARE @local_variable (Transact-SQL)
table (Transact-SQL)
sys.fn_helpcollations (Transact-SQL)