在MY SQL 里有money这个数据类型吗?没有用哪个可以代替啊,在 SQL 2000里有的,

解决方案 »

  1.   

    只有decimal, 不会有精度损失,和currency一样
    DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL] A 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. 
    [align=center]====  ====
    [/align]
      

  2.   

    decimal就可以了。
    然后可以用format函数来格式化。