數學函數
ABS:(返回絕對值)
--返回絕對值
select abs(-1.11) from dual;
CEIL:(向上取整)
--向上取整
select ceil(3.1415) from dual;
FLOOR:(向下取整)
--向下取整
select floor(3.1415) from dual;
MOD:(返回相除后的余數)
--相除取余
select mod(4,3) from dual;
POWER:(返回次方)
--次方
select power(2,3)from dual;
SIGN:(取數字符號)
--取數字符號
--大於0返回1,小於0返回-1,等於0返回0
select sign(-5) from dual;
SQRT:(返回數字的根)
--返回數字的根
select sqrt(4) from dual;
ROUND:(四舍五入)
--四舍五入
select round(3.1415) from dual;
trunc:(按照精度截取數字)
--截取數字
select trunc(3.1415926,2) from dual;