Azure Synapse Analytics SQL 池的数据库排序规则支持Database collation support for Azure Synapse Analytics SQL pool

新建 Azure Synapse SQL 池数据库时,可以从 Azure 门户更改默认数据库排序规则。You can change the default database collation from the Azure portal when you create a new Azure Synapse SQL pool database. 利用此功能,可以更轻松地使用 3800 个受支持的数据库排序规则之一创建新数据库。This capability makes it even easier to create a new database using one of the 3800 supported database collations.

排序规则为基于字符的数据类型提供区域设置、代码页、排序顺序和字符敏感度规则。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.

更改排序规则Changing collation

若要更改默认排序规则,请在预配体验中更新“排序规则”字段。To change the default collation, update to the Collation field in the provisioning experience.

例如,如需将默认排序规则更改为区分大小写,只需将“排序规则”从 SQL_Latin1_General_CP1_CI_AS 重命名为 SQL_Latin1_General_CP1_CS_AS 即可。For example, if you wanted to change the default collation to case sensitive, you would simply rename the Collation from SQL_Latin1_General_CP1_CI_AS to SQL_Latin1_General_CP1_CS_AS.

不受支持的排序规则类型的列表List of unsupported collation types

  • Japanese_Bushu_Kakusu_140_BINJapanese_Bushu_Kakusu_140_BIN
  • Japanese_Bushu_Kakusu_140_BIN2Japanese_Bushu_Kakusu_140_BIN2
  • Japanese_Bushu_Kakusu_140_CI_AI_VSSJapanese_Bushu_Kakusu_140_CI_AI_VSS
  • Japanese_Bushu_Kakusu_140_CI_AI_WS_VSSJapanese_Bushu_Kakusu_140_CI_AI_WS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AI_KS_VSSJapanese_Bushu_Kakusu_140_CI_AI_KS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AI_KS_WS_VSSJapanese_Bushu_Kakusu_140_CI_AI_KS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AS_VSSJapanese_Bushu_Kakusu_140_CI_AS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AS_WS_VSSJapanese_Bushu_Kakusu_140_CI_AS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AS_KS_VSSJapanese_Bushu_Kakusu_140_CI_AS_KS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AS_KS_WS_VSSJapanese_Bushu_Kakusu_140_CI_AS_KS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AI_VSSJapanese_Bushu_Kakusu_140_CS_AI_VSS
  • Japanese_Bushu_Kakusu_140_CS_AI_WS_VSSJapanese_Bushu_Kakusu_140_CS_AI_WS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AI_KS_VSSJapanese_Bushu_Kakusu_140_CS_AI_KS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AI_KS_WS_VSSJapanese_Bushu_Kakusu_140_CS_AI_KS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AS_VSSJapanese_Bushu_Kakusu_140_CS_AS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AS_WS_VSSJapanese_Bushu_Kakusu_140_CS_AS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AS_KS_VSSJapanese_Bushu_Kakusu_140_CS_AS_KS_VSS
  • Japanese_Bushu_Kakusu_140_CS_AS_KS_WS_VSSJapanese_Bushu_Kakusu_140_CS_AS_KS_WS_VSS
  • Japanese_Bushu_Kakusu_140_CI_AIJapanese_Bushu_Kakusu_140_CI_AI
  • Japanese_Bushu_Kakusu_140_CI_AI_WSJapanese_Bushu_Kakusu_140_CI_AI_WS
  • Japanese_Bushu_Kakusu_140_CI_AI_KSJapanese_Bushu_Kakusu_140_CI_AI_KS
  • Japanese_Bushu_Kakusu_140_CI_AI_KS_WSJapanese_Bushu_Kakusu_140_CI_AI_KS_WS
  • Japanese_Bushu_Kakusu_140_CI_ASJapanese_Bushu_Kakusu_140_CI_AS
  • Japanese_Bushu_Kakusu_140_CI_AS_WSJapanese_Bushu_Kakusu_140_CI_AS_WS
  • Japanese_Bushu_Kakusu_140_CI_AS_KSJapanese_Bushu_Kakusu_140_CI_AS_KS
  • Japanese_Bushu_Kakusu_140_CI_AS_KS_WSJapanese_Bushu_Kakusu_140_CI_AS_KS_WS
  • Japanese_Bushu_Kakusu_140_CS_AIJapanese_Bushu_Kakusu_140_CS_AI
  • Japanese_Bushu_Kakusu_140_CS_AI_WSJapanese_Bushu_Kakusu_140_CS_AI_WS
  • Japanese_Bushu_Kakusu_140_CS_AI_KSJapanese_Bushu_Kakusu_140_CS_AI_KS
  • Japanese_Bushu_Kakusu_140_CS_AI_KS_WSJapanese_Bushu_Kakusu_140_CS_AI_KS_WS
  • Japanese_Bushu_Kakusu_140_CS_ASJapanese_Bushu_Kakusu_140_CS_AS
  • Japanese_Bushu_Kakusu_140_CS_AS_WSJapanese_Bushu_Kakusu_140_CS_AS_WS
  • Japanese_Bushu_Kakusu_140_CS_AS_KSJapanese_Bushu_Kakusu_140_CS_AS_KS
  • Japanese_Bushu_Kakusu_140_CS_AS_KS_WSJapanese_Bushu_Kakusu_140_CS_AS_KS_WS
  • Japanese_XJIS_140_BINJapanese_XJIS_140_BIN
  • Japanese_XJIS_140_BIN2Japanese_XJIS_140_BIN2
  • Japanese_XJIS_140_CI_AI_VSSJapanese_XJIS_140_CI_AI_VSS
  • Japanese_XJIS_140_CI_AI_WS_VSSJapanese_XJIS_140_CI_AI_WS_VSS
  • Japanese_XJIS_140_CI_AI_KS_VSSJapanese_XJIS_140_CI_AI_KS_VSS
  • Japanese_XJIS_140_CI_AI_KS_WS_VSSJapanese_XJIS_140_CI_AI_KS_WS_VSS
  • Japanese_XJIS_140_CI_AS_VSSJapanese_XJIS_140_CI_AS_VSS
  • Japanese_XJIS_140_CI_AS_WS_VSSJapanese_XJIS_140_CI_AS_WS_VSS
  • Japanese_XJIS_140_CI_AS_KS_VSSJapanese_XJIS_140_CI_AS_KS_VSS
  • Japanese_XJIS_140_CI_AS_KS_WS_VSSJapanese_XJIS_140_CI_AS_KS_WS_VSS
  • Japanese_XJIS_140_CS_AI_VSSJapanese_XJIS_140_CS_AI_VSS
  • Japanese_XJIS_140_CS_AI_WS_VSSJapanese_XJIS_140_CS_AI_WS_VSS
  • Japanese_XJIS_140_CS_AI_KS_VSSJapanese_XJIS_140_CS_AI_KS_VSS
  • Japanese_XJIS_140_CS_AI_KS_WS_VSSJapanese_XJIS_140_CS_AI_KS_WS_VSS
  • Japanese_XJIS_140_CS_AS_VSSJapanese_XJIS_140_CS_AS_VSS
  • Japanese_XJIS_140_CS_AS_WS_VSSJapanese_XJIS_140_CS_AS_WS_VSS
  • Japanese_XJIS_140_CS_AS_KS_VSSJapanese_XJIS_140_CS_AS_KS_VSS
  • Japanese_XJIS_140_CS_AS_KS_WS_VSSJapanese_XJIS_140_CS_AS_KS_WS_VSS
  • Japanese_XJIS_140_CI_AIJapanese_XJIS_140_CI_AI
  • Japanese_XJIS_140_CI_AI_WSJapanese_XJIS_140_CI_AI_WS
  • Japanese_XJIS_140_CI_AI_KSJapanese_XJIS_140_CI_AI_KS
  • Japanese_XJIS_140_CI_AI_KS_WSJapanese_XJIS_140_CI_AI_KS_WS
  • Japanese_XJIS_140_CI_ASJapanese_XJIS_140_CI_AS
  • Japanese_XJIS_140_CI_AS_WSJapanese_XJIS_140_CI_AS_WS
  • Japanese_XJIS_140_CI_AS_KSJapanese_XJIS_140_CI_AS_KS
  • Japanese_XJIS_140_CI_AS_KS_WSJapanese_XJIS_140_CI_AS_KS_WS
  • Japanese_XJIS_140_CS_AIJapanese_XJIS_140_CS_AI
  • Japanese_XJIS_140_CS_AI_WSJapanese_XJIS_140_CS_AI_WS
  • Japanese_XJIS_140_CS_AI_KSJapanese_XJIS_140_CS_AI_KS
  • Japanese_XJIS_140_CS_AI_KS_WSJapanese_XJIS_140_CS_AI_KS_WS
  • Japanese_XJIS_140_CS_ASJapanese_XJIS_140_CS_AS
  • Japanese_XJIS_140_CS_AS_WSJapanese_XJIS_140_CS_AS_WS
  • Japanese_XJIS_140_CS_AS_KSJapanese_XJIS_140_CS_AS_KS
  • Japanese_XJIS_140_CS_AS_KS_WSJapanese_XJIS_140_CS_AS_KS_WS
  • SQL_EBCDIC1141_CP1_CS_ASSQL_EBCDIC1141_CP1_CS_AS
  • SQL_EBCDIC277_2_CP1_CS_ASSQL_EBCDIC277_2_CP1_CS_AS

查看当前的排序规则Checking the current collation

若要查看数据库的当前排序规则,可运行以下 T-SQL 代码片段:To check the current collation for the database, you can run the following T-SQL snippet:

SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') AS Collation;

将“Collation”作为属性参数传递时,DatabasePropertyEx 函数将返回指定数据库的当前排序规则。When passed 'Collation' as the property parameter, the DatabasePropertyEx function returns the current collation for the database specified. 有关详细信息,请参阅 DatabasePropertyExFor more information, see DatabasePropertyEx.