日期:2014-05-17 浏览次数:20433 次
select top 3 JF,
case row_number() over(order by getdate())
when 1 then 100
when 2 then 50
when 3 then 30
end as 点数
from [USER] ORDER BY jf desc
with t as
(select *,row_number() over(order by jf desc) 'rn'
from [USER]
)
update t
set t.[点数字段]=t.[点数字段]
+case rn when 1 then 100
when 2 then 50
when 3 then 30 end
where rn<=3