1: 根本就不行
2:如果有主键,可以用
Select (Select sum(1) from 表 where 主键<=a.主键) as iid,* from 表 a
where (Select sum(1) from 表 where 主键<=a.主键) >= 100
3: 否则
Select identity(int,1,1) as iid,* into #tmp from 表
Select * from #tmp where iid >= 100
drop table #tmp
2:如果有主键,可以用
Select (Select sum(1) from 表 where 主键<=a.主键) as iid,* from 表 a
where (Select sum(1) from 表 where 主键<=a.主键) >= 100
3: 否则
Select identity(int,1,1) as iid,* into #tmp from 表
Select * from #tmp where iid >= 100
drop table #tmp
select * from #temp where ID_Num between 10 and 20
或:CREATE PROCEDURE GetProductsPaged
@lastProductID int,
@pageSize int
AS
SET ROWCOUNT @pageSize
SELECT *
FROM Products
WHERE [standard search criteria]
AND ProductID > @lastProductID
ORDER BY [Criteria that leaves ProductID monotonically increasing]
GO