I have two colums on mysql database table which holds float values. What I need is to get the sum of two colums and my mysql query is as follow
SELECT amntGot,commission, SUM(amntGot+commission) as amt from mytable;
Issue I got is the sum value goes wrong in the result For example
amntGot = 4.6175
commission = 0.3825
Then amt goes to4.999999821186066
. I expect result as 5 Which is (4.6175+0.3825) I dont know why the result gives me4.999999821186066 instead of 5
I could not find a dolution from StackOverflow, so any solution would be much appreciated,
I have attached screenshots of few results below