一句很简单的语句
select * from table where name='名字'
表里name有:名字
但就是执行这条语句时没有记录.请问怎么回事
在线等待中!!!!!!!!!

解决方案 »

  1.   

    name是否设置为Char型?  
    用Like查一下,是有多余的字符导致
     Select * from table where name Like'%名字%'
      

  2.   

    tryselect * from table where name=N'名字'
      

  3.   

    select * from table where name='名字'--------------
    這樣select * from table where isnull(name,'')='名字'
      

  4.   

    select * from table where name like'%名字%'
      

  5.   

    select * from table where cast(name as varchar(100))='名字'試試
      

  6.   

    select * from table where [name] like'%名字%'
      

  7.   

    select * from table where rtrim(name)='名字'