读书人

SQL Server2005查询中文字符无返回行,

发布时间: 2012-01-18 00:23:26 作者: rapoo

SQL Server2005查询中文字符无返回行,为什么?
表名 cites 结构如下
id english chinese distict province
1 Hongkong 香港 0852 香港
2 Beijing 北京 010 北京

查询 select * from cites where english ='Hongkong' 可以返回该行,没问题
但是 select * from cites where chinese ='香港' 则无返回行,也不报错
用 select * from cites where chinese =N'香港' 这个也不好用

[解决办法]
你的SQL SERVER 是英文版的,按说条件前面加N就可以了,你模糊查询试一下
select * from cites where chinese LIKE N'%香港%'
[解决办法]
没遇到过此问题。。。
[解决办法]
我这没问题

是不是SQL的版本问题

读书人网 >VB Dotnet

热点推荐