查询区分大小写
来源:互联网 发布:json-lib maven 编辑:程序博客网 时间:2024/05/08 13:17
--区分大小写、全半角字符的方法
--测试数据
create table 表(fd varchar(10))
insert into 表
select aa='aa'
union all select 'Aa'
union all select 'AA' --全角A
union all select 'A,A' --全角A,半角,
union all select 'A,A' --全角A,全角,
go
--查询
--1.查大写字母
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%A%'
--就是在字段名后加 collate Chinese_PRC_CS_AS_WS
--2.查全角
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%A%'
--3.查半角
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%,%'
go
--测试数据
create table 表(fd varchar(10))
insert into 表
select aa='aa'
union all select 'Aa'
union all select 'AA' --全角A
union all select 'A,A' --全角A,半角,
union all select 'A,A' --全角A,全角,
go
--查询
--1.查大写字母
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%A%'
--就是在字段名后加 collate Chinese_PRC_CS_AS_WS
--2.查全角
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%A%'
--3.查半角
select * from 表
where fd collate Chinese_PRC_CS_AS_WS like '%,%'
go
- 查询区分大小写
- 查询区分大小写
- SQL查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- 查询区分大小写
- C#中用回车代替tab
- 用c#打开一个外部文件
- ASP.NET应用程序的安全方案(二)—授权
- c#存取图片
- 测试图片
- 查询区分大小写
- Java HotSpot性能引擎的体系结构
- 实例化SqlParameterCollection的方法是
- 关于web服务写日志的费话
- 用缓冲技术提高JSP应用的性能和稳定性
- 心情好,真是没办法的事!
- JAVA性能技巧和防火墙隧道技术
- SELECT CAST(10.6496 AS int) 的结果为?
- 技术成长历程(.net)1