请问,在SQLSERVER中,一张表有10000条数据,如何取出第10条至第100条数据?
2个回答
展开全部
--如果有按字段排序 假设字段A
select top 90 * from (select top 100 * from TB order by A) k order by A desc
--如果没按字段排序
select * from (select row_number()over(order by getdate()) as rn,* from TB) k
where k.rn between 10 and 100
select top 90 * from (select top 100 * from TB order by A) k order by A desc
--如果没按字段排序
select * from (select row_number()over(order by getdate()) as rn,* from TB) k
where k.rn between 10 and 100
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询