首页 > 其他 > 详细

DECIMAL Data Type

时间:2016-06-27 01:28:59      阅读:308      评论:0      收藏:0      [点我收藏+]

In MySQL, DECIMAL(M,D) and NUMERIC(M,D) are the same, and both have a precision of exactly M digits.

Leftover Digits    Number of Bytes
0             0
12            1
34            2
56            3
79            4

 For example,

DECIMAL(18,9) column has nine digits on either side of the decimal point, so the integer part and the fractional part each require 4 bytes.

DECIMAL(20,6) column has fourteen integer digits and six fractional digits.

The integer digits require four bytes for nine of the digits and 3 bytes for the remaining five digits.

The six fractional digits require 3 bytes.

DECIMAL Data Type

原文:http://www.cnblogs.com/zengkefu/p/5618994.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!