日期:2014-05-18 浏览次数:20517 次
update test set num = replace([num], [num],[color=#FF0000] [num]*10[/color])
declare @test table (num numeric(5,1)) insert into @test select 8 union all select 7.2 union all select 6 union all select 21 union all select 7 union all select 12 update @test set num=case when num*10>100 then 100 else num*10 end select * from @test /* num --------------------------------------- 80.0 72.0 60.0 100.0 70.0 100.0 */