Float not correct in MySQL

前端 未结 5 1767
旧时难觅i
旧时难觅i 2020-12-06 14:06

I am entering \'35444650.00\' as a float into my MySQL and it keeps reformatting to 35444648.00, any help welcome...

5条回答
  •  旧时难觅i
    2020-12-06 14:59

    A float has 6 digits of precision. Use a double to get 15 or switch to a numeric(x,y). If you're interested, check out the storage requirements for MySQL for the different data types.

提交回复
热议问题