首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle 四舍五入 获得的数值

2012-08-11 
oracle 四舍五入 取得的数值SELECT ROUND( number, [ decimal_places ] ) FROM DUAL--说明:number :-- 将

oracle 四舍五入 取得的数值

SELECT ROUND( number, [ decimal_places ] ) FROM DUAL--说明:number :-- 将要处理的数值decimal_places :-- 四舍五入,小数取几位,不填默认为0Sample :select round(987.456) from dual;           --  结果: 987select 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 

热点排行