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)
SQL Server查询条件区分大小写方法
最新推荐文章于 2024-09-29 10:09:55 发布