List:MySQL on Win32« Previous MessageNext Message »
From:C.R. Vegelin Date:October 7 2005 2:26pm
Subject:Re: UPDATE does round value automatically - is it an error?
View as plain text  
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.
> 
> 
> -- 
> felix
> 
> -- 
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:    http://lists.mysql.com/win32?unsub=1
> 
> 
>

Thread
UPDATE does round value automatically - is it an error?Georg Vassilopulos7 Oct
  • Re: UPDATE does round value automatically - is it an error?Felix Geerinckx7 Oct
  • Re: UPDATE does round value automatically - is it an error?C.R. Vegelin7 Oct