CAST() 函数
程序员文章站
2022-04-09 19:06:09
作用: 四舍五入 SELECT CAST('9.0' AS DECIMAL) FROM DUAL; -- 9 SELECT CAST('9.5' AS DECIMAL) FROM DUAL; -- 10 SELECT CAST('9.6' AS DECIMAL) FROM DUAL; -- 10 S ......
作用: 四舍五入
select cast('9.0' as decimal) from dual; -- 9
select cast('9.5' as decimal) from dual; -- 10
select cast('9.6' as decimal) from dual; -- 10
select cast('9.3' as decimal) from dual; -- 9
select cast('9.5' as decimal(10,3)) from dual; -- 9.500
上一篇: 《利用python进行数据分析 第二版》——第一章 准备工作
下一篇: [日常] DNS解析概述