Can't store numbers like 9.846563 in MySQL INT fields. Everything after "." is not written to the DB. Does it mean that I have to use VARCHAR instead of INT?
Thank you.
INT means integer. You need float or double.
johanafm, thank you for reply.
I tried FLOAT, but instead of
9.8148148
database saves:
9.81481
Can DOUBLE store more digits?
With float you can set the precision when you create the table the default is 4 digits after the decimal, so float(12,7) would give you 7 digits after the decimal
OK, it seems that DOUBLE is what I am looking for. One more question - is it OK to create Index on DOUBLE column?
rincewind456, thank you.
Is FLOAT better than DOUBLE?
Depends what you want, take a look at the link I gave in my first post, it will help you decide.