补充一句:用select form table where no=0,就是找不到其中几条而已,大部分还是能到的!

解决方案 »

  1.   

    float类型不是精确计算的,而是近似值!mysql> select @@version,1/3+1/3+1/3,1/3+1/3+1/3=0.999999999;
    +--------------+-------------+-------------------------+
    | @@version    | 1/3+1/3+1/3 | 1/3+1/3+1/3=0.999999999 |
    +--------------+-------------+-------------------------+
    | 5.0.13-rc-nt |      1.0000 |                       1 |
    +--------------+-------------+-------------------------+
    1 row in set (0.01 sec)mysql> select @@version,1/3+1/3+1/3,1/3+1/3+1/3=1;
    +--------------+-------------+---------------+
    | @@version    | 1/3+1/3+1/3 | 1/3+1/3+1/3=1 |
    +--------------+-------------+---------------+
    | 5.0.13-rc-nt |      1.0000 |             0 |
    +--------------+-------------+---------------+
    1 row in set (0.00 sec)mysql> select @@version,1/3+1/3+1/3,1/3+1/3+1/3=1;
    +-----------+-------------+---------------+
    | @@VERSION | 1/3+1/3+1/3 | 1/3+1/3+1/3=1 |
    +-----------+-------------+---------------+
    | 4.0.17-nt |        1.00 |             1 |
    +-----------+-------------+---------------+
    1 row in set (0.16 sec)
      

  2.   

    今天,又研究了一下,我怀疑是mysql 5.0的问题,如果我执行select no from table where no=0 ,就能全部显示!如果select *from table where no=0 就是会少了那几条数据的!
      

  3.   

    你的NO是INT还是FLOAT,DECIMAL?