SQLSERVER字符串截取------ROUND
round(a,b,c)
a:要被截取的小数
b:保留的位数,如果为负数,则向小数点左边截取. 下面会有实例.
c: 为0时,表示要进行四舍五入
c: 为0以外的数字时,表示不需要四舍五入,直接截断.
c可有可无.没有c时表示需要四舍五入
select * from css

select round(a,2) from css

select round(a,2,1) from css

select round(a,-2) from css

select round(a,-2,8) from css

浙公网安备 33010602011771号