共计 338 个字符,预计需要花费 1 分钟才能阅读完成。
看完本章你会学习到以下
- 数字函数有那些
- Round 和 TRUNC 之间的区别
SELECT ABS(-2) FROM DUAL; -- 2
SELECT ROUND(2.281,1) FROM DUAL; -- 2.3
SELECT MOD(10,3) FROM DUAL; --- 1
SELECT POWER(2,3) AS 平方,POWER(2,-1) AS 求导 FROM DUAL;
SELECT TRUNC(4.1231,2) FROM DUAL; ---- 截取小数点后几位,不参与四舍五入 4.12
SELECT ABS(-2)AS 绝对值
,ROUND(2.281,1)AS 四舍五入
,MOD(10,3)AS 求余
,POWER(2,3) AS 平方,POWER(2,-1) AS 求导
,TRUNC(4.1231,2) AS 不四舍五入取整 FROM DUAL;
正文完