Table
Alter table name
Alter column name nvarchar (100) (type) Collate chinese_prc_ci_as
-- Case insensitive
ALTER TABLE TB
Alter column colname nvarchar (100) Collate chinese_prc_cs_as
-- Case sensitive
Modify to field
Also, in the design table-field-sorting rules -... Set case sensitivity
Database
Alter database
Collate chinese_prc_cs_as
-- Case sensitive
Alter database
Collate chinese_prc_ci_as
-- Case insensitive
Specify the sorting rule.
Windows sorting rule name
Specify the Windows sorting rule name in the Collate clause. The Windows sorting rule name consists of the sorting rule indicator and comparison style.
Syntax:
<Windows_collation_name >::=
Collationdesignator _ <comparisonstyle>
<Comparisonstyle >::=
Casesensitivity_accentsensiti.pdf
[_ Kanatypesensitive [_ widthsensitive]
| _ Bin
Parameters
Collationdesignator
Specifies the basic sorting rules used by Windows sorting rules. Basic sorting rules include:
Specifies the alphabet or language in which the sorting rules are applied when sorting by dictionary is specified.
Used to store non-UNICODE character data Code Page.
For example, latin1_general or French, both use the code page 1252 or Turkish, and use the code page 1254.
Casesensiti.pdf
The CI parameter is case insensitive and the CS parameter is case sensitive.
Accentsensiti.pdf
AI specifies no accent, and as specifies the accent.
Kanatypesensitive
Omitted specifies case-insensitive, and Ks specifies a Kana type.
Widthsensiti.pdf
Omitted specifies case-insensitive, and WS specifies case-sensitive.
Bin
Specify the binary sorting order.
Upper(TRANSACT-SQL)
Returns a character expression that converts lowercase data to uppercase.
Transact-SQL syntax conventions
Syntax
Upper (character_expression) parameter
Character_expression
A character data expression. Character_expression can be a constant, variable, character column, or binary data column.
The data type of character_expression must be implicitly converted to varchar. Otherwise, use cast to explicitly convert character_expression.
Return type
Varchar or nvarchar
Lower
Converts uppercase data to lowercase data and returns a character expression.
Syntax
Lower (character_expression)
Parameters
Character_expression
Is a character or binary data expression. Character_expression can be a constant, variable, or column. Character_expression must be a data type that can be implicitly converted to varchar. Otherwise, use cast to explicitly convert character_expression.
Return type
Varchar