SELECT ROUND( number, [ decimal_places ] ) FROM DUAL
--说明:
number :-- 将要处理的数值
decimal_places :-- 四舍五入,小数取几位,不填默认为0
Sample :
select round(987.456) from dual; -- 结果: 987
select round(987.456, 0) from dual; -- 结果: 987
select round(987.456, 1) from dual; -- 结果: 987.5
select round(987.456, 2) from dual; -- 结果:987.46
select round(987.456, 3) from dual; -- 结果: 987.456
select round(-987.456, 2) from dual; -- 结果:-987.46
oracle 四舍五入 取得的数值
最新推荐文章于 2022-08-30 13:38:41 发布