当前位置: 代码迷 >> Sql Server >> sqlserver2005里不能用中文做where条件怎么处理?
  详细解决方案

sqlserver2005里不能用中文做where条件怎么处理?

热度:66   发布时间:2016-04-27 21:08:43.0
sqlserver2005里不能用中文做where条件怎么办??
我今天刚装了个sqlserver2005,把以前sqlserver2000里的数据导入进来了,可是发现不能用中文做where的条件了,请问大家怎么解决??
ygbh           ygxm       password
1                 张三       123456
2                 aa           123456

“ygbh”是int
"ygxm "是   nvarchar

用select   *   from   xx   where   ygxm= '张三 '就没有记录
用select   *   from   xx   where   ygxm= 'aa '     就有记录



------解决方案--------------------
select * from xx where ygxm=N '张三 '
  相关解决方案