Floating point types
Floating point numbers represent real numbers in computing. Real numbers are useful for measuring continuous values, such as weight, height, or speed.
MySQL has two floating point data types for storing approximate values: FLOAT and DOUBLE.
For floating point numbers, precision is an important factor. Precision defines the measure of accuracy. MySQL supports single precision and double precision floating point numbers. It consumes four bytes to store a single precision floating point number with the FLOAT data type, whereas it consumes eight bytes to store a double precision floating point number with the DOUBLE data type.
In MySQL, REAL is a synonym for DOUBLE PRECISION. As mentioned earlier, if REAL_AS_FLOAT is enabled, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access