ROUND discrepancy
Why don’t these two mysql operations give me the same answer.
##### Operation 1 - SQL #####
SELECT ROUND(2.56789, 2) FROM DUAL;
Gives Answer = 2.57
##### Operation 2 - Function #####
BEGIN
DECLARE r FLOAT;
SET r = ROUND(2.56789, 2);
RETURN r;
END
Gives Answer = 2.5699999332428
Just wanted your take on this.
Thanks
Chris
Subject
Written By
Posted
ROUND discrepancy
January 29, 2020 04:30AM
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.