Collation - Character Code Page in SQL Server Transact-SQL


What Is a Collation in SQL Server Transact-SQL?



A collation in Transact-SQL is a set of specifications defining a character set and its sorting rules. SQL Server support a large number of built-in collations. For example:

  • Albanian_CI_AI_KS_WS - Albanian, case-insensitive (CI), accent-insensitive (AI), kanatype-sensitive (KS), width-sensitive (WS).
  • Arabic_CI_AS_KS_WS - Arabic, case-insensitive, accent-sensitive, kanatype-sensitive, width-sensitive.
  • French_CI_AI - French, case-insensitive, accent-insensitive, kanatype-insensitive, width-insensitive.
  • Korean_Wansung_BIN - Korean-Wansung, binary sort.
  • SQL_Latin1_General_CP1250_CI_AS - Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive.

If you want to get a list of all collations support on the SQL Server, run this statement:

SELECT * FROM fn_helpcollations();


Default Collation in SQL Server Transact-SQL

Single-byte String Literals in SQL Server Transact-SQL

Data Literals in SQL Server Transact-SQL

⇑⇑ SQL Server Transact-SQL Tutorials

2017-05-13, 1827🔥, 0💬