还有阿
select * from enterpress where username='abc' and passwd='aa'的结果也是空:(

解决方案 »

  1.   

    select * from enterpress where rtrim(passwd)='aa'  --查询的结果是空
      

  2.   

    select * from enterpress where rtrim(username)='abc' and rtrim(passwd)='aa'不行吗???????????????
      

  3.   

    select * from enterpress where rtrim(passwd)
    结果还是空:(
      

  4.   

    select * from enterpress where rtrim(username)='abc' and rtrim(passwd)='aa'
    不行!!!!!!!!!
      

  5.   

    你用的SQL Server 吗?对了,你的字段passwd是用的什么类型的!
      

  6.   

    select passwd from enterpress where rtrim(username)='abc'
    看看里面是什么???
      

  7.   

    因为没有“passwd='aa'”的记录,但是有“username='abc'”的记录。
      

  8.   

    天知道 passwd 是怎么样的?没有任何参考信息。
      

  9.   

    对于字符串比较,建议使用一些字符串比较函数来做
    “aa"<>"aa "
      

  10.   

    但是'aa'=rtrim('aa ')
    不好意思,上面用了双引号