At 03:29 PM 11/17/2006, Ahmad Al-Twaijiry wrote:
Ho everyone

I have a column in a table defined as float

mynumber float(20,2)

if we say mynumber column in a row is 1000000 ,  when I run this SQL :

UPDATE Table SET mynumber=mynumber-100.15

the mynumber column will be 999900 not 999899.85

what is the problem ?

Ho Ho Ho,

Float only uses 4 bytes and does not have much precision so you'll get rounding. Try DOUBLE instead.

Mike

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to