February 2018
Intermediate to advanced
510 pages
16h 10m
English
As described earlier, floating point data types store approximate real numbers. Trying to store an exact value and use it in comparison operations considering exact values may lead to various problems. Also, floating point values are interpreted in a platform and implementation-dependent manner. For example, different CPUs or operating systems may evaluate floating point numbers differently. This essentially means that the value intended to be stored in the floating point data type column may not be the same as the actual value stored or represented internally.
The previous point becomes essential when we use floating point numbers in comparison. Consider the following example:
mysql> CREATE TABLE temp(id ...
Read now
Unlock full access