5 messages in com.mysql.lists.win32Re: UPDATE does round value automatic...
FromSent OnAttachments
Vassilopulos, Georg07 Oct 2005 05:06 
Jorge Bastos07 Oct 2005 05:56 
Felix Geerinckx07 Oct 2005 06:50 
Jorge Bastos07 Oct 2005 06:51 
C.R. Vegelin07 Oct 2005 07:26 
Subject:Re: UPDATE does round value automatically - is it an error?
From:C.R. Vegelin (vege@freeler.nl)
Date:10/07/2005 07:26:34 AM
List:com.mysql.lists.win32

Hi All,

What about this ? CREATE TABLE Test ( F FLOAT ) Type = MyISAM; INSERT INTO Test VALUES ( 10323.22 ); INSERT INTO Test VALUES ( 10323.2222 ); SELECT * FROM Test; 10323.2 10323.2 SELECT Round(F,3) FROM Test; 10323.220 10323.223 SELECT Round(F,4) FROM Test; 10323.2197 10323.2227 Regards, Cor

Subject: Re: UPDATE does round value automatically - is it an error?

On 07/10/2005, "Vassilopulos, Georg" wrote:

The Table is MyIsam and there is a Database field with Datatype float called "kasse_s"

The value of this field is 10323.2

I want to UPDATE this field to 10323.22

After the update which goes without errors the field value is still 10323.2 and not as I would expect 10323.22

10323.22 is beyond the precision of the FLOAT datatype. Use DOUBLE instead.