ZhyjEye

SQL查询区分大小写方法

在SQL SERVER 中, 默认   select * from table where column1 = \' xx \' 不区分大小写
collate 选择排序 , 可用在查询区分大小写上,例:
select * from table where column1 collate Chinese_PRC_CS_AS= \'xx\'
select * from table where column1 collate Chinese_PRC_CS_AS like \'a%\'

CI    不区分大小写,CS  区分大小写。
AI    不区分重音,AS    区分重音。  
Omitted      不区分大小写,WS   区分大小写。

 

 

group by 区分大小写:
select (filed collate Chinese_PRC_CS_AI) as filed from table
group by (filed collate Chinese_PRC_CS_AI)  

 

 

摘自:https://blog.csdn.net/y1535623813/article/details/88656550

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-11-05
  • 2021-12-23
  • 2019-12-09
  • 2021-12-23
猜你喜欢
  • 2021-10-25
  • 2021-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-08-26
相关资源
相似解决方案