金慧星的回答:
round(3.45) >>>>>3.5 4舍5入 ceil(3.45)>>>>>>4 最接近的较大整数(ceiling天花板的意思) floor(3.45)>>>>>>3 最接近的较小整数(floor地板的意思)
金承勋的回答:
其实,你说的截取小数点前的数字,也就是将小数转换为整数。 可以使用函数【cast】进行转换 示例:将1234.9678转为整数 select?cast(1234.9678?as?int)输出结果为:1234
胡振宇的回答:
substring(ID,1,(charindex(".",ID)-1) 从ID第一位开始截取 到 ‘.’前面的值
孙勇的回答:
trunc(125.815) would return 125 trunc(125.815, 0) would return 125 trunc(125.815, 1) would return 125.8 trunc(125.815, 2) would return 125.81 trunc(125.815, 3) would return 125.815 trunc(-125.815, 2) would return -125.81 trunc(125.815, -1) would return 120 trunc(125.815, -2) would return 100 trunc(125.815, -3) would return 0
起初友人。的回答: