SQL Server 排序规则名称 (Transact-SQL)

为 SQL Server 排序规则指定排序规则名称的单个字符串。

主题链接图标Transact-SQL 语法约定

语法

<SQL_collation_name> :: = 
     SQL_SortRules[_Pref]_CPCodepage_<ComparisonStyle>

<ComparisonStyle> ::=
        _CaseSensitivity_AccentSensitivity | _BIN

参数

  • SortRules
    标识字母表或语言的字符串,当指定按字典排序时应用该字母表或语言的排序规则。例如 Latin1_General 或波兰语。

  • Pref
    指定大写字母优先。

  • Codepage
    指定用于标识排序规则所使用的代码页的 1 至 4 位数号码。CP1 指定代码页 1252,对于所有其他代码页,则需要指定完整的代码页号码。例如,CP1251 指定代码页 1251,CP850 指定代码页 850。

  • CaseSensitivity
    CI 指定不区分大小写,CS 指定区分大小写。

  • AccentSensitivity
    AI 指定不区分重音,AS 指定区分重音。

  • BIN
    指定使用二进制排序顺序。

注释

下表列出了 SQL Server 排序规则名称。

排序顺序 ID

SQL Server 排序规则名称

30

SQL_Latin1_General_Cp437_BIN

31

SQL_Latin1_General_Cp437_CS_AS

32

SQL_Latin1_General_Cp437_CI_AS

33

SQL_Latin1_General_Pref_CP437_CI_AS

34

SQL_Latin1_General_Cp437_CI_AI

40

SQL_Latin1_General_Cp850_BIN

41

SQL_Latin1_General_Cp850_CS_AS

42

SQL_Latin1_General_Cp850_CI_AS

43

SQL_Latin1_General_Pref_CP850_CI_AS

44

SQL_Latin1_General_Cp850_CI_AI

49

SQL_1Xcompat_CP850_CI_AS

50

Latin1_General_BIN

51

SQL_Latin1_General_Cp1_CS_AS

52

SQL_Latin1_General_Cp1_CI_AS

53

SQL_Latin1_General_Pref_CP1_CI_AS

54

SQL_Latin1_General_Cp1_CI_AI

55

SQL_AltDiction_Cp850_CS_AS

56

SQL_AltDiction_Pref_CP850_CI_AS

57

SQL_AltDiction_Cp850_CI_AI

58

SQL_Scandinavian_Pref_Cp850_CI_AS

59

SQL_Scandinavian_Cp850_CS_AS

60

SQL_Scandinavian_Cp850_CI_AS

61

SQL_AltDiction_Cp850_CI_AS

71

Latin1_General_CS_AS

72

Latin1_General_CI_AS

73

Danish_Norwegian_CS_AS

74

Finnish_Swedish_CS_AS

75

Icelandic_CS_AS

80

Hungarian_BIN(或 Albanian_BIN、Czech_BIN 等1)

81

SQL_Latin1_General_Cp1250_CS_AS

82

SQL_Latin1_General_Cp1250_CI_AS

83

SQL_Czech_Cp1250_CS_AS

84

SQL_Czech_Cp1250_CI_AS

85

SQL_Hungarian_Cp1250_CS_AS

86

SQL_Hungarian_Cp1250_CI_AS

87

SQL_Polish_Cp1250_CS_AS

88

SQL_Polish_Cp1250_CI_AS

89

SQL_Romanian_Cp1250_CS_AS

90

SQL_Romanian_Cp1250_CI_AS

91

SQL_Croatian_Cp1250_CS_AS

92

SQL_Croatian_Cp1250_CI_AS

93

SQL_Slovak_Cp1250_CS_AS

94

SQL_Slovak_Cp1250_CI_AS

95

SQL_Slovenian_Cp1250_CS_AS

96

SQL_Slovenian_Cp1250_CI_AS

104

Cyrillic_General_BIN(或 Ukrainian_BIN、Macedonian_FYROM_90_BIN)

105

SQL_Latin1_General_Cp1251_CS_AS

106

SQL_Latin1_General_Cp1251_CI_AS

107

SQL_Ukrainian_Cp1251_CS_AS

108

SQL_Ukrainian_Cp1251_CI_AS

112

Greek_BIN

113

SQL_Latin1_General_Cp1253_CS_AS

114

SQL_Latin1_General_Cp1253_CI_AS

120

SQL_MixDiction_Cp1253_CS_AS

121

SQL_AltDiction_Cp1253_CS_AS

124

SQL_Latin1_General_Cp1253_CI_AI

128

Turkish_BIN

129

SQL_Latin1_General_Cp1254_CS_AS

130

SQL_Latin1_General_Cp1254_CI_AS

136

Hebrew_BIN

137

SQL_Latin1_General_Cp1255_CS_AS

138

SQL_Latin1_General_Cp1255_CI_AS

144

Arabic_BIN

145

SQL_Latin1_General_Cp1256_CS_AS

146

SQL_Latin1_General_Cp1256_CI_AS

153

SQL_Latin1_General_Cp1257_CS_AS

154

SQL_Latin1_General_Cp1257_CI_AS

155

SQL_Estonian_Cp1257_CS_AS

156

SQL_Estonian_Cp1257_CI_AS

157

SQL_Latvian_Cp1257_CS_AS

158

SQL_Latvian_Cp1257_CI_AS

159

SQL_Lithuanian_Cp1257_CS_AS

160

SQL_Lithuanian_Cp1257_CI_AS

183

SQL_Danish_Pref_Cp1_CI_AS

184

SQL_SwedishPhone_Pref_Cp1_CI_AS

185

SQL_SwedishStd_Pref_Cp1_CI_AS

186

SQL_Icelandic_Pref_Cp1_CI_AS

192

Japanese_BIN

193

Japanese_CI_AS

194

Korean_Wansung_BIN

195

Korean_Wansung_CI_AS

196

Chinese_Taiwan_Stroke_BIN

197

Chinese_Taiwan_Stroke_CI_AS

198

Chinese_PRC_BIN

199

Chinese_PRC_CI_AS

200

Japanese_CS_AS

201

Korean_Wansung_CS_AS

202

Chinese_Taiwan_Stroke_CS_AS

203

Chinese_PRC_CS_AS

204

Thai_BIN

205

Thai_CI_AS

206

Thai_CS_AS

210

SQL_EBCDIC037_CP1_CS_AS

211

SQL_EBCDIC273_CP1_CS_AS

212

SQL_EBCDIC277_CP1_CS_AS

213

SQL_EBCDIC278_CP1_CS_AS

214

SQL_EBCDIC280_CP1_CS_AS

215

SQL_EBCDIC284_CP1_CS_AS

216

SQL_EBCDIC285_CP1_CS_AS

217

SQL_EBCDIC297_CP1_CS_AS

1对于排序顺序 ID 80,请使用代码页为 1250 的任何 Window 排序规则,并使用二进制顺序。例如:Albanian_BIN、Croatian_BIN、Czech_BIN、Romanian_BIN、Slovak_BIN、Slovenian_BIN。