Re: ROUND discrepancy
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.
cheers,
Jon Stephens
MySQL Documentation Team @ Oracle
Orlando, Florida, USA
MySQL Dev Zone
MySQL Server Documentation
Oracle
Subject
Written By
Posted
Re: ROUND discrepancy
January 29, 2020 09:49AM
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.