日期:2014-05-19  浏览次数:20710 次

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 '张三 '