开发者

Extend precision of MySQL's double datatype?

开发者 https://www.devze.com 2022-12-26 19:58 出处:网络
I am trying to save the value \"6.714285714285714\" into a DOUBLE datatype field. Unfortunately, it does not fit at all and is trimmed by one digit. Storing larger numbers becomes less precise.

I am trying to save the value "6.714285714285714" into a DOUBLE datatype field.

Unfortunately, it does not fit at all and is trimmed by one digit. Storing larger numbers becomes less precise.

I have already searched in the mysql manual and it seems to be th开发者_StackOverflow社区at double is the most precise data type available. Does anyone know a practical workaround?


DECIMAL is a better choice than DOUBLE if you need precision.

0

精彩评论

暂无评论...
验证码 换一张
取 消