【mysql】sql语句的四舍五入

一、round(a,b)函数函数 a:须要四舍五入的数值spa b:小数点后的位数ci 例子:select round(123.4564,2) from dual; ast 结果:123.46select 二、decimal(a,b)函数im a:定位精度cas b:小数点后保留的位数 例子:select cast('123.4564' as decimal(38,2)) from dual; 结
相关文章
相关标签/搜索