1、trunc() 函数
TRUNC(number[,decimals])
select trunc(123.11)from dual; select trunc(123.11,2)from dual; select trunc(123.11,-1)from dual;
2、round()函数(四舍五入)
ROUND(number,[decimal_places])
select round(123.456,0) from dual; //123 select round(123.456,1) from dual; //123.5 select round(123.456,2) from dual; //123.46
3、ceil() 函数和 loor() 函数
数据库中 ceil()、floor()、round()、trunc() 函数用法
原文:https://www.cnblogs.com/ZhengYing0813/p/14645161.html