[Valentina] [OFF] Decimal field in mySQL

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 20 15:39:33 CST 2003


on 1/20/03 3:16 PM, Marcus Bointon at marcus at synchromedia.co.uk wrote:

>> Anybody have use Decimal field in mySQL ?
>> 
>> I wonder, because by sources, it looks like they do not have implemented
>> arithmetic for decimals ???
>> 
>> You should be able easy check this:
>> 
>> Make table with f1 and f2 decimal fields.
>> Make one records { 3.4  4.8 }
>> 
>> Now do 
>> 
>>   SELECT f1 + f2 FROM T
>> 
>> By sources I see that result will be 7.
>> 
>> Can anybody check this and confirm ?
> 
> Yup, it works correctly for me. Both fields as float type, I get 8.2 (or
> close enough). I'm running MySQL 3.23.49.

Marcus,

But I ask not float type but DECIMAL type,
Which do NOT loose digits.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list