Numbers in a FLOAT or DOUBLE Type Lose Precision
(Doc ID 1429713.1)
Last updated on DECEMBER 24, 2020
Applies to:
MySQL Server - Version 4.0 to 5.5 [Release 4.0 to 5.5]Information in this document applies to any platform.
Symptoms
A number with more than about 7 digits may lose precision when inserted into a FLOAT field.
A number with more than about 16 digits may lose precision when inserted into a DOUBLE field.
A number with a fractional part may lose precision even if it is just a few digits.
For example:
CREATE TABLE t (f FLOAT);
INSERT INTO t VALUES (50000001);
SELECT f FROM t;
Result: 50000000
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |