Wrong value returned from mysql float
问题 I have a table with high precision value, stored as Float . When I query the table for that value it returns rounded off value, rounded to 1st digit. But when I run the below query I am getting the value that I have stored, SELECT MY_FLOAT_COL*1 FROM MY_TABLE; What's going on inside Mysql? 回答1: If you want to store exact values, you'd use the DECIMAL data types. By manual of FLOAT: The FLOAT and DOUBLE types represent approximate numeric data values. MySQL uses four bytes for single-precision