oracle的round函数
2020-06-06 07:14
513 查看
round:对某个值进行四舍五入
格式:round(number,decimals)
参数:
number:要进行四舍五入的数值
decimals:指明需保留小数点后面的位数。可选项,忽略它则截去所有的小数部分,并四舍五入。如果为正数则表示从小数点右边开始的位置进行四舍五入,如果为负数则表示从小数点开始左边的位数,相应整数数字用0填充,小数被去掉。
案例如下
select round(1235.466) from dual;-- 返回结果为1235相当于round(1235.466,0) select round(1235.466,2) from dual;-- 返回结果为1235.47 select round(1235.466,-1) from dual;-- 返回结果为1240 select round(1234.466,-1) from dual;-- 返回结果为1230 select round(1234.466,3) from dual;-- 返回结果为1234.466
相关文章推荐
- Oracle round函数是什么意思?怎么运用?
- oracle round函数的使用方法
- oracle中round函数的使用
- Oracle round函数
- Oracle中Round函数(四舍五入)的使用
- Oracle round函数
- oracle之round函数、over()函数
- Oracle round函数 保留小数位数
- Oracle中的Round函数
- Oracle 的 Round函数
- oracle之round函数使用
- ORACLE中的ROUND函数
- oracle round函数的使用方法 .
- Oracle round函数是什么意思?怎么运用?
- Oracle--Round函数
- Oracle round函数是什么意思?怎么运用?
- 2017年末大数据Linux,Oracle,MySQL,J2EE(JavaEE),Hadoop,Spark综合开发实践
- Oracle命令全集
- Oracle的安装及完全卸载
- 在oracle下触发器实现主键自增