取出表A中第31到第40记录
方法一:
select top 10 * from A where RowId not in (select top 10 RowId from A)
方法二(使用临时表):
with tempTable as (select row_number()over(order by RowId) as newRowId,* from A)
select * from tempTable where newRowId between 31 and 40
方法一:
select top 10 * from A where RowId not in (select top 10 RowId from A)
方法二(使用临时表):
with tempTable as (select row_number()over(order by RowId) as newRowId,* from A)
select * from tempTable where newRowId between 31 and 40