--处理示例:select 结果=cast(round(列一,2) as decimal(10,2))
from(
select 列一=20.206
union all select 13.596
union all select 82.120
union all select 22.999
)a/*--处理结果
结果           
------------ 
20.21
13.60
82.12
23.00(所影响的行数为 4 行)
--*/

解决方案 »

  1.   

    --处理示例2:select 结果=cast(列一 as decimal(10,2))
    from(
    select 列一=20.206
    union all select 13.596
    union all select 82.120
    union all select 22.999
    )a/*--处理结果
    结果           
    ------------ 
    20.21
    13.60
    82.12
    23.00(所影响的行数为 4 行)
    --*/
      

  2.   

    very good!
    I am looking for it!
      

  3.   

    用round函数ROUND
    返回数字表达式并四舍五入为指定的长度或精度。语法
    ROUND ( numeric_expression , length [ , function ] ) 下例显示两个表达式,说明使用 ROUND 函数且最后一个数字始终是估计值。SELECT ROUND(123.9994, 3), ROUND(123.9995, 3) 
    GO下面是结果集:----------- -----------
    123.9990    124.0000 
      

  4.   

    select convert(decimal(10,2),列一) as 列一
    from(
    select 20.206 as 列一
    union all select 13.596
    union all select 82.120
    union all select 22.999
    ) A