【MaxCompute学习】隐式转化的问题
有一次计算一个数据的百分比,想把小数结果取2位,并拼接一个百分号展示在结果报表中。用到的sql如下
select concat(round(10230/1497409,4)*100,'%') from dual;
很奇怪局部数据并没有保留2位小数,比如上面的数据返回的是67.99999999999999
我计算了下上面的结果大概得到的数据为0.0068
select concat(round(0.0066 ,4)*100,'%') from dual;--0.66% select concat(round(0.0067 ,4)*100,'%') from dual;--0.67% select concat(round(0.0068 ,4)*100,'%') from dual;--0.6799999999999999% sele