Site icon Truth In 24

Why does MySQL float round number to closest 100? [closed]

I am migrating my data from SQLite to MySQL. One surprising issue was this: When I copied table, and took the data types that MySQL suggested, a few id columns turned into float. This would not have been a big problem as such. However, MySQL started rounding them to the closest full hundred. So, e.g. id 68496893 became 68496800.

Do you know why this happened? Data type float should handle values up to 3.402823466E+38.

Exit mobile version