How to Show the Server Collation in SQL Server (T-SQL)

The server collation acts as the default collation for all system databases that are installed with the instance of SQL Server, as well as any newly created user databases. The server collation is specified during SQL Server installation.

Below are two ways to check the server collation in SQL Server using Transact-SQL.

The SERVERPROPERTY() Function

One option is to use theĀ SERVERPROPERTY() function:

SELECT CONVERT (varchar, SERVERPROPERTY('collation')) AS 'Server Collation';

This returns the collation like this:

Server Collation
----------------------------
SQL_Latin1_General_CP1_CI_AS

Using the sp_helpsort Stored Procedure

Another option for returning the server’s collation is to use the sp_helpsort stored procedure to return the default collation for the server:

EXECUTE sp_helpsort;

This returns the server’s default collation like this:

Server default collation
----------------------------
Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data

Also see: