Home > database >  With a regular expression error case-sensitive queries
With a regular expression error case-sensitive queries

Time:10-12

The statement is as follows:
SELECT * FROM the Database
WHERE rtrim (col) not like '% [^ A - Z] %' COLLATE Chinese_PRC_CS_AS
Want to query data col for pure capital letters, but the query is
Lowercase letters, I tried if it's not connection symbol, in square brackets enumeration out 26 letters is able to meet the requirements, why can't the rest of this interval?

CodePudding user response:

Use Chinese_PRC_BIN, tested the Chinese_PRC_CS_AS sorting is
A
A
B
B
C
C
This also means that A to Z I interval is contain lowercase

CodePudding user response:

reference no. 2 floor ZJCXC -- personal WeChat public same response:
use Chinese_PRC_BIN, tested the Chinese_PRC_CS_AS sorting is
A
A
B
B
C
C
This also means that A to Z I interval is contain lowercase letter

Just try once, solve, thank you bosses!
  • Related