有一些数据,存进来有“1.2”这样的,也有“135457112”亿计的
建立了float类型存储,发现百万或者亿计的数字,取出来都成了科学记数法表示了。。这怎么回事
另外,float的长度我写的是0

解决方案 »

  1.   

    select * from xx
    出来的就是科学记数法
    我现在把float的长度写成了9,取出来可以了
    这个长度9是什么意思呢?
      

  2.   

    FLOAT[(M,D)] [UNSIGNED] [ZEROFILL] A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38. These are the theoretical limits, based on the IEEE standard. The actual range might be slightly smaller depending on your hardware or operating system. M is the total number of digits and D is the number of digits following the decimal point. If M and D are omitted, values are stored to the limits allowed by the hardware. A single-precision floating-point number is accurate to approximately 7 decimal places. 9应该是数字位数(长度)
      

  3.   

    FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]
    M是小数纵位数,D是小数点后面的位数。如果M和D被省略,根据硬件允许的限制来保存值。单精度浮点数精确到大约7位小数位。
      

  4.   

    我用navicate编辑的字段,float,“长度”那里写的是9
    desc了一下表,发现这个字段是float(9,0)
    navicate在哪里编辑它的第二个值?
      

  5.   

    在类型中float
    长度 9,2
    2位小数
      

  6.   

    不会贴图片。。界面上就叫“十进位”,填了这个,字段就是float(9,2)了