MySQL Forums
Forum List  »  General

Re: ROUND discrepancy
Posted by: Jon Stephens
Date: January 29, 2020 09:49AM

Hi Chris,

In the first case, MySQL treats the value as exact (DECIMAL); in the second, you've declared it as an approximate type (FLOAT). MySQL does not store or handle the two sorts of numbers in quite the same way.

You might find Problems with Floating-Point Values, as well as the Manual sections on DECIMAL and FLOAT, to be relevant here.


Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation

Options: ReplyQuote

Written By
January 29, 2020 04:30AM
Re: ROUND discrepancy
January 29, 2020 09:49AM
January 30, 2020 08:13AM
January 30, 2020 09:28AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.