select round(YourField,4) from YourTable where YourWhere不可以吗?

解决方案 »

  1.   

    ROUND
    返回数字表达式并四舍五入为指定的长度或精度。语法
    ROUND ( numeric_expression , length [ , function ] ) 参数
    numeric_expression精确数字或近似数字数据类型类别的表达式(bit 数据类型除外)。length是 numeric_expression 将要四舍五入的精度。length 必须是 tinyint、smallint 或int。当 length 为正数时,numeric_expression 四舍五入为 length 所指定的小数位数。当 length 为负数时,numeric_expression 则按 length 所指定的在小数点的左边四舍五入。function是要执行的操作类型。function 必须是 tinyint、smallint 或 int。如果省略 function 或 function 的值为 0(默认),numeric_expression 将四舍五入。当指定 0 以外的值时,将截断 numeric_expression。返回类型
    返回与 numeric_expression 相同的类型。
      

  2.   

    Math.Round 方法 (Double, Int32)
    返回具有指定精度、最接近指定值的数。[Visual Basic]
    Overloads Public Shared Function Round( _
       ByVal value As Double, _
       ByVal digits As Integer _
    ) As Double
    [C#]
    public static double Round(
       double value,
       int digits
    );
    [C++]
    public: static double Round(
       double value,
       int digits
    );
    [JScript]
    public static function Round(
       value : double,
       digits : int
    ) : double;
    参数
    value 
    要舍入的双精度浮点数。 
    digits 
    返回值中的有效小数位数(精度)。 
    返回值
    精度等于 digits 的、最接近 value 的数字。如果 value 位于两个数字的中间,其中一个为偶数,另一个为奇数,则返回偶数。如果 value 的精度小于 digits,则返回 value 而不做更改。备注
    digits 参数指定返回值的有效小数位数,其范围在 0 到 15 之间。如果 digits 为零,则返回一个整数。此方法的行为遵循 IEEE 标准 754 的第 4 节。这种舍入有时称为就近舍入或银行家舍入。如果 digits 为零,则这种舍入有时称为“向零舍入”。示例
    [Visual Basic, C#, C++] 下面的代码演示就近舍入。[Visual Basic] 
    Math.Round(3.44, 1) 'Returns 3.4.
    Math.Round(3.45, 1) 'Returns 3.4.
    Math.Round(3.46, 1) 'Returns 3.5.
    [C#] 
    Math.Round(3.44, 1); //Returns 3.4.
    Math.Round(3.45, 1); //Returns 3.4.
    Math.Round(3.46, 1); //Returns 3.5.
      

  3.   

    Round()是在SQL中截取
    Math.Round()是在C#中或VB.net