日期:2014-05-18  浏览次数:20513 次

从第5条记录开始取数据.
现在要在一张表中取数据。从第5条记录开始取。每次取10个记录。的分页SQL语句怎么写?

------解决方案--------------------
create proc pro_page
@i int=0
as
select id=identity(int,1,1),* into # from [Table]
select * from # where id between @i*10+5 and (@i+1)*10+5-1
drop table #