SQL Server 2005 case sensitivity settings reference

Source: Internet
Author: User
Tags character set

1. Set SQL scripts to be case insensitive
USE [master]
GO
Alter database [DatabaseName] COLLATE Chinese_PRC_CI_AI
GO

2. Set high SQL script case sensitivity
USE [master]
GO
Alter database [DatabaseName] COLLATE Chinese_PRC_CS_AI
GO

3. Set reference value
_ CI_AI is case-insensitive, stress-insensitive, Kana-insensitive, and width-insensitive
_ CI_AI_WS are case-insensitive, Kana-insensitive, and width-aware.
_ CI_AI_KS is case-insensitive, case-insensitive, Kana-type, and width-insensitive.
_ CI_AI_KS_WS are case-insensitive, ks_ws are kana-type, and width-aware.
_ CI_AS is case-insensitive, stress-sensitive, but not Kana type, and width-insensitive
_ CI_AS_WS is case-insensitive, stress-sensitive, and Kana-type.
_ CI_AS_KS is case-insensitive, stress-sensitive, Kana-type, and width-insensitive.
_ CI_AS_KS_WS are case-insensitive, stress-sensitive, and ks_ws are case-insensitive.
_ CS_AI case sensitive, accent-insensitive, Kana-insensitive, and width-insensitive
_ CS_AI_WS case-sensitive, stress-insensitive, Kana-type, and width-sensitive
_ CS_AI_KS case sensitive, accent-insensitive, Kana type, and width-insensitive
_ CS_AI_KS_WS case-sensitive, case-insensitive, Kana-type, and width-sensitive
_ CS_AS case sensitive, stress-sensitive, non-Kana type, and width-insensitive
_ CS_AS_WS case sensitive, stress sensitive, not Kana type, width differentiated
_ CS_AS_KS case sensitive, stress sensitive, Kana type, width insensitive
_ CS_AS_KS_WS case sensitive, stress sensitive, Kana type, and width sensitive

 

 

* CS (Case-sensiti.pdf): specifies the Case Sensitivity of CS.

CI (Case-insensiti.pdf): It specifies Case-insensitive.

 

The company's common language set is Chinese_PRC_CI_AS.

 

Example: Chinese_PRC_CS_AI_WS
 

First half: the UNICODE character set. The Chinese_PRC _ pointer sorts UNICODE in simplified Chinese characters.

The second half of the sorting rule is the suffix meaning:

_ BIN binary sorting

_ CI (CS) is case sensitive, CI is case insensitive, and CS is case sensitive

_ Whether AI (AS) distinguishes stress, AI does not distinguish,

_ KI (KS) indicates whether kana is distinguished. KI is not distinguished, and KS is distinguished.

_ Whether WI (WS) is differentiated by width WI and WS

Case Sensitive: select this option if you want to make the comparison between uppercase and lowercase letters different.

Accent differentiation: select this option if you want to treat the comparison as different from the accent and non-accent letters. If this option is selected, the comparison also treats letters with different accents as unequal.

Kana differentiation: select this option if you want to treat katakana and katakana as different Japanese syllables.

Width differentiation: select this option if you want to make the comparison between Halfwidth and fullwidth characters.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.