ceil(15.47)取比15.47大的最近的一個整數
SQL> select ceil(15.47) from dual;
CEIL(15.47)
-----------
16
floor(15.47)取比15.47小的最近的一個整數
SQL> select floor(15.47) from dual;
FLOOR(15.47)
------------
15
trunc(15.47)隻取整數部分
SQL> select trunc(15.47) from dual;
TRUNC(15.47)
------------
15
trunc(15.47,1)取一位小數
SQL> select trunc(15.47,1) from dual;
TRUNC(15.47,1)
--------------
15.4
rount(15.47)四舍無入取整
SQL> select round(15.47) from dual;
ROUND(15.47)
------------
15
round(15.47,1)四舍五入保留一位小數
SQL> select round(15.47,1) from dual;
ROUND(15.47,1)
--------------
15.5[@[email protected]]