I have a table with a float datatype. I create a record, and set the value of the field to .06, but the database stores it as 5.9999999999999998E-2. If I assign the value 1.06, it is stored as 1.0600000000000001. If I assign the value 110.06 to the field, it is stored as 110.06. How can I force the databse to retain only the precision I assign the field in my SQL, without modifying the schema, so that even small amounts like .06 are stored to two decimal points?
2007-01-05
11:55:16
·
6 answers
·
asked by
© 2007. Sammy Z.
6
in
Computers & Internet
➔ Programming & Design
I am not porting this to MySQL, when I say "my SQL," I am refering to my SQL statement.
2007-01-05
12:01:44 ·
update #1
As I said - changing the datatype is NOT an option.
2007-01-06
03:10:16 ·
update #2