Home > database >  Write about in the field of the patterns of problems
Write about in the field of the patterns of problems

Time:11-18

Dear moderators,

SQL server 2005 database, the table there is a list of values:
The xx xx (Beijing) co., LTD.
The xx xx (Beijing) co., LTD.

Two values in the () is as the difference between Chinese or English,
But the select * from t where c='sea xx xx (Beijing) co., LTD.'
Can put the above two column values of all of the data, if handled?

CodePudding user response:

 
The create table t (id int, c varchar (100))

Insert into t (id, c)
Select 1, 'sea xx xx (Beijing) co., LTD.' union all
Select 2, 'sea xx xx (Beijing) co., LTD.'


Select *
The from t
Where c='sea xx xx (Beijing) co., LTD., collate Chinese_PRC_CS_AI_WS

/*
Id c
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 the xx xx (Beijing) co., LTD.

Line (1) affected
*/

CodePudding user response:

The
reference 1/f, started the first reply:
 
The create table t (id int, c varchar (100))

Insert into t (id, c)
Select 1, 'sea xx xx (Beijing) co., LTD.' union all
Select 2, 'sea xx xx (Beijing) co., LTD.'


Select *
The from t
Where c='sea xx xx (Beijing) co., LTD., collate Chinese_PRC_CS_AI_WS

/*
Id c
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 the xx xx (Beijing) co., LTD.

Line (1) affected
*/


Is this kind of case, AA, AA this distinction is lost?

CodePudding user response:

Chinese_PRC_CS_AI_WS - & gt; Case sensitive
Chinese_PRC_CI_AI_WS - & gt; case-insensitive
  • Related