Home Oracle 的精确函数
Post
Cancel

Oracle 的精确函数

ROUND

按照指定的精度进行四舍五入

1
2
3
select round(3.1415926, 4) from dual;
------------------
3.1416

TRUNC

按照指定的精度进行截取一个数

1
2
3
select trunc(3.1415926, 4) from dual;
------------------
3.1415

FLOOR

对给定的数字取整数位

1
2
3
select floor(2345.67) from dual;
------------------
2345

CEIL

返回大于或等于给出数字的最小整数

1
2
3
select ceil(3.1415927) from dual;
------------------
4
This post is licensed under CC BY 4.0 by the author.