RT,mysql中我用此语句居然无法查出结果本应该显示的一条结果。mysql> select * from mailMatchNumber;
+-------------+-------------+-------------+
| matchnumber | mailf       | mailm       |
+-------------+-------------+-------------+
|         111 | [email protected] | [email protected] |
+-------------+-------------+-------------+
1 row in set (0.00 sec)mysql> select * from mailMatchNumber where mailf='[email protected]';
Empty set (0.00 sec)
这是为什么?

解决方案 »

  1.   


    这样却可以,是mysql对字符串中的数字有什么要求吗?
    mysql> select * from mailMatchNumber;
    +-------------+-------------+-------------+
    | matchnumber | mailf       | mailm       |
    +-------------+-------------+-------------+
    |         111 | [email protected] | [email protected] |
    |         222 | [email protected]  | [email protected]  |
    +-------------+-------------+-------------+
    2 rows in set (0.00 sec)mysql> select * from mailMatchNumber where mailf = '[email protected]';+-------------+------------+------------+
    | matchnumber | mailf      | mailm      |
    +-------------+------------+------------+
    |         222 | [email protected] | [email protected] |
    +-------------+------------+------------+
    1 row in set (0.01 sec)
      

  2.   

    Mysql也支持查询条件中的表达式的,可能'.'号是关键字吧
      

  3.   

    如果sql中没有空格,那么我猜就是你数据库中有空格。。楼主查一下你数据库
      

  4.   

    找到原因了, 我都不好意思说出来了各位, 数据存入的时候我把163打成L63了 
    damn。