作用: 四捨五入 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