由买买提看人间百态

topics

全部话题 - 话题: mbbo
(共0页)
e******r
发帖数: 220
1
来自主题: Database版 - for round() function in SQL
I used the following command to format the data output, but got some
wired data. What is the reason? Thanks
select round( ( ( bestbid + bestoffer) /2 ) / 0.05 , 0 ) * 0.05
as mbbo from table;
mbbo
34.200000000000003
14.25
6.2000000000000002
45.650000000000006
10.15
1.1500000000000001
4.5499999999999998
0.70000000000000007
3.4000000000000004
13.25
6.0
12.0
5.0500000000000007
1.4000000000000001
28.25
0.65000000000000002
20.950000000000003
0.30000000000000004
2.8000000000000003
0.700000
(共0页)