都不知道你的表结构怎么回答你的问题?
思路是这样的
update a
set col1=???
where id in (select top 10 id from a order by createtime desc)
select top 10 * from a order by createtime desc如果update后数据有变动,再次top 10的结果可能不一样,那么就要先将top 10记录到临时表中再更新,然后再返回。
思路是这样的
update a
set col1=???
where id in (select top 10 id from a order by createtime desc)
select top 10 * from a order by createtime desc如果update后数据有变动,再次top 10的结果可能不一样,那么就要先将top 10记录到临时表中再更新,然后再返回。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货