本帖最后由 rorom 于 2009-11-10 10:02:37 编辑

解决方案 »

  1.   

    用DECIMAL型
     packed “exact” fixed-point number. M is the total number of digits (the precision) and D is the number of digits after the decimal point (the scale). The decimal point and (for negative numbers) the ‘-’ sign are not counted in M. If D is 0, values have no decimal point or fractional part. The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported decimals (D) is 30. If D is omitted, the default is 0. If M is omitted, the default is 10. 
      

  2.   

    算了,我把我全部的贴出来可能大家看的清楚些:
    新列表:编号  代理帐号  帐户更改时间  帐户更改原因  变动金额  余额帐户  佣金帐户  类型  
    193 test 2009-11-09 15824139085/缴费30 30.0 6884.014 15.18 缴费 
    194 test 2009-11-09 划账100.0元 100.0 6984.014 15.18 划账 
    195 test 2009-11-09 划账5.0元 5.0 6989.014 15.18 划账 
    196 test 2009-11-09 划账1200.0元 1200.0 8189.014 15.18 划账 
    197 test 2009-11-09 划账55555.0元 55555.0 63744.016 15.18 划账 
    198 test 2009-11-09 划账777777.0元 777777.0 841521.0 15.18 划账 
    199 test 2009-11-09 [1]余额+0.05元 0.05 841521.06 15.18 佣金转余额 
    200 test 2009-11-09 [2]佣金-0.05元 0.05 841521.06 15.13 佣金转余额 
    201 test 2009-11-09  100.0 841421.06 15.13 调整余额 
    202 test 2009-11-09  800000.0 41421.062 15.13 调整余额 
      

  3.   

    1楼的 那个,我只需要精确到后3位,这个到底需不需要用到DECIMAL型 呢.
    double也不行?
      

  4.   

    像你这种应用,建议用DECIMAL或NUMERIC类型
    否则,进行计算时,容易出现失真问题
      

  5.   

    虽然DECIMAL或NUMERIC类型所占的存储空间要大,但像这样的金额数据,为了避免失真问题的产生,所以,还是考虑DECIMAL或NUMERIC类型为好