我有一个表中的字段,现在数据为:0.15,0.09,0.20.,我想显示为15%,9%,20%,该怎么实现

解决方案 »

  1.   

    select ltrim(cast(col*100 as dec(10,0)))+'%' as col from tb
      

  2.   


    if object_id('[table3]') is not null drop table [table3]
    create table [table3]([value] float)
    insert [table3]
    select 0.15 union all
    select 0.09 union all
    select 0.20
    select convert(varchar,value*100)+'%' from table3
      

  3.   

    select CONVERT(varchr,字段*100)+'%' as baifenbi from table
      

  4.   

    selec ltrim(oolumn*100 as decimal(10,0)+'%' as col
    from tb