Database collation support for Synapse SQL in Azure Synapse Analytics
Collations provide the locale, code page, sort order, and character sensitivity rules for character-based data types. Once chosen, all columns and expressions requiring collation information inherit the chosen collation from the database setting. The default inheritance can be overridden by explicitly stating a different collation for a character-based data type.
This article applies to dedicated SQL pools in Azure Synapse workspaces, for more information on dedicated SQL pools (formerly SQL DW), see Collation types supported for dedicated SQL pool (formerly SQL DW).
You can change the default database collation from the Azure portal when you create a new dedicated SQL pool database. This capability makes it even easier to create a new database using one of the 3800 supported database collations.
You can specify the default serverless SQL pool database collation at creation time using CREATE DATABASE statement.
In Azure Synapse Analytics, query text (including variables, constants, etc.) is always handled using the database-level collation, and not the server-level collation as in other SQL Server offerings.
To change the default collation for dedicated SQL pool database, update to the Collation field in the provisioning experience. For example, if you wanted to change the default collation to case sensitive, you would change the collation from
To change the default collation for a serverless SQL pool database, you can use ALTER DATABASE statement.
The following table shows which collation types are supported by which service.
|Collation Type||Serverless SQL Pool||Dedicated SQL Pool - Database & Column Level||Dedicated SQL Pool - External Table (Native Support)||Dedicated SQL Pool - External Table (Hadoop/Polybase)|
Check the current collation
To check the current collation for the database, you can run the following T-SQL snippet:
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') AS Collation;
When passed 'Collation' as the property parameter, the DatabasePropertyEx function returns the current collation for the database specified. For more information, see DATABASEPROPERTYEX.
Additional information on best practices for dedicated SQL pool and serverless SQL pool can be found in the following articles:
Submit and view feedback for