select * from a,b where a.name=b.name and a.desp=b.desp collate Chinese_PRC_CS_AI
这种写法,是只针对desp字段区分大小写,还是针对2个字段都区分啊?
------解决方案--------------------
当前查询的条件
------解决方案--------------------
desp
------解决方案--------------------
desp 字段
------解决方案--------------------
- SQL code
create table tb(val varchar(10),vc varchar(10))insert into tbselect 'A','a' union allselect 'b','B' union allselect 'a','A'goselect *from tbwhere val = 'a' or vc = 'b' collate Chinese_PRC_CS_AI/*val vc---------- ----------A aa A(2 行受影响)*/select *from tbwhere val = 'a' collate Chinese_PRC_CS_AI or vc = 'b' collate Chinese_PRC_CS_AI/*val vc---------- ----------a A(1 行受影响)*/drop table tb