Oracle round函数是什么意思?怎么运用?

前端之家收集整理的这篇文章主要介绍了Oracle round函数是什么意思?怎么运用?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Oracle round函数是什么意思?怎么运用?

2006-11-03 09:32 TideCC | 浏览 211958 次
@H_301_26@2016-04-15 16:17 提问者采纳
如何使用 Oracle Round 函数 (四舍五入)
描述 : 传回一个数值,该数值是按照指定的小数位元数进行四舍五入运算的结果。
SELECT ROUND( number,[ decimal_places ] ) FROM DUAL
参数:
number : 欲处理之数值
decimal_places : 四舍五入,小数取几位 ( 预设为 0 )
Sample :
select round(123.456,0) from dual;          回传 123 
select round(123.456,1) from dual;          回传 123.5 
select round(123.456,2) from dual;          回传 123.46 
select round(123.456,3) from dual;          回传 123.456 
select round(-123.456,2) from dual;        回传 -123.46
提问者评价
谢谢
评论 | 233 24

MBox|七级采纳率48%

原文链接:https://www.f2er.com/oracle/213099.html

猜你在找的Oracle相关文章