I read a book and an example about FLOAT value,
Data type : FLOAT
Original Value : 1234567.89
Value stored : 1234570
Byte used : 4
My wondering point is that I think if FLOAT can save up to 7 digits then why storing Value is 1234570 not 1234568,
then why this example round up this value from units(I mean first digit to the left of decimal point).
Thank you
======== edit ==================================
My book is Murach's MySQL, and I'm sorry to say that, this was my fault , actually This book is not telling that "FLOAT can save up to 7 digits" like I said above,
I think I was misunderstanding the meaning of this quote
The FLOAT type can be used to store a single-precision number, which provides for numbers with up to 7 significant digits. - p238 from Murach's MySQL 3rd edition
============================ add test result ============
I've just test about FLOAT and DOUBLE type, same input and different Output
FLOAT shows always 0 at the last number.
DOUBLE is keeping the number.
I'm curious as you can see, Float does not round number up at 65.00 (second row from '====='). I can not yet figure out why this is happened..
