if object_id('test')is not null drop table test
go
create table test(Id int ,[name] varchar(10) collate Chinese_PRC_CS_AS)
insert test select 1,'A'
insert test select 2,'a'
insert test select 3,'adad'
insert test select 4,'Dads'
select * from test where [name] like '%a%' collate Chinese_PRC_CI_AS
/*Id name
----------- ----------
1 A
2 a
3 adad
4 Dads*/
go
create table test(Id int ,[name] varchar(10) collate Chinese_PRC_CS_AS)
insert test select 1,'A'
insert test select 2,'a'
insert test select 3,'adad'
insert test select 4,'Dads'
select * from test where [name] like '%a%' collate Chinese_PRC_CI_AS
/*Id name
----------- ----------
1 A
2 a
3 adad
4 Dads*/
解决方案 »
- 为什么是owner后无法这样连接数据库?
- 创建视图时的执行结果正常,不过打开视图时数据和执行结果不一致!?
- SQL SERVER 2005制定备份计划后无法执行
- 请各位介绍本好点的sql的书!
- 使用CONTAINS查询时出错 消息“全文操作运行失败。查询子句只包含被忽略的词。 ”
- 问【fcuandy 和 dawugui】一个关于普通行 列转换的问题!!
- 请教一个查询账龄的SQL,非常感谢回答。
- 我想写一个应用于UPDATE的Trigger,请帮帮忙
- 多个线程共用一个ado连接,会降低性能吗?
- SQLserver安装
- SQL Server2005安装问题,亟待解决
- 新手在线救命求 sql组合查询
go
create table test(Id int ,[name] varchar(10) collate Chinese_PRC_CS_AS)
insert test select 1,'A'
insert test select 2,'a'
insert test select 3,'adad'
insert test select 4,'Dads'
select * from test where [name] like '%a%' --collate Chinese_PRC_CI_AS
/*Id name
----------- ----------
2 a
3 adad
4 Dads*/
但是还是不行,请问是什么原因。
select * from Product where name like '%dvd%'
select * from pRoDuct where name like '%Dvd%'
结果不一样,但是表明已经不区分大小写了,只是like 后边的字段还是区分大小写,请教应该怎么修改?