10

我有个问题。当我有这段代码时,SELECT FIRST_NAME FROM CONTACT WHERE FIRST_NAME LIKE '%ñ%'为什么它会返回所有FIRST_NAME没有. 我只期待那些有。提前致谢。nññ

4

2 回答 2

13
SELECT FIRST_NAME 
FROM CONTACT 
WHERE FIRST_NAME LIKE '%ñ%' COLLATE utf8_spanish_ci 
于 2012-11-13T07:17:22.437 回答
13

尝试使用BINARY运算符以二进制方式比较字符串 -

SELECT FIRST_NAME FROM CONTACT WHERE FIRST_NAME LIKE BINARY '%ñ%'
于 2012-11-13T07:19:58.267 回答