关于MY SQ L 的数据类型

冷启动 2008-04-24 11:17:51
在MY SQL 里有money这个数据类型吗?没有用哪个可以代替啊,在 SQL 2000里有的,
...全文
53 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
懒得去死 2008-04-25
  • 打赏
  • 举报
回复
decimal就可以了。
然后可以用format函数来格式化。
wwwwb 2008-04-24
  • 打赏
  • 举报
回复
没有,用DECIMAL类型试试
liuyann 2008-04-24
  • 打赏
  • 举报
回复

只有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.

==== ====

56,675

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧