declare @t table(百分比1 varchar(10),百分比2 varchar(10),百分比3 varchar(10),百分比4 varchar(10),百分比5 varchar(10)) insert into @t select '5%','25%','5%','50%','75%'select max(cast(replace(col,'%','') as dec(10,2))) from (select 百分比1 as col from @t union all select 百分比2 from @t union all select 百分比3 from @t union all select 百分比4 from @t union all select 百分比5 from @t)a
insert into @t select '5%','25%','5%','50%','75%'select max(cast(replace(col,'%','') as dec(10,2)))
from
(select 百分比1 as col from @t
union all
select 百分比2 from @t
union all
select 百分比3 from @t
union all
select 百分比4 from @t
union all
select 百分比5 from @t)a