oracle中rand()⽅法详解,函数原型 SELECT ROUND( number, [ decimal_places ] ) FROM DUAL
例⼦:
select round(86.87) from dual;  回传 87
select round(86.87, 0) from dual; 回传87
select round(86.87, 1) from dual; 回传86.9
select round(86.87, 2) from dual; 回传 86.87
select round(86.87, 3) from dual; 回传 86.87oracle decimal类型
select round(86.87, -1) from dual; 回传 90
select round(86.87, -2) from dual; 回传 100
select round(86.87, -3) from dual; 回传 0
select round(86.87, -4) from dual; 回传0
select round(-86.87, -1) from dual; 回传 -90
通过例⼦,⾃⼰总结下吧。很容易明⽩。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。