利用ROW_NUMBER()创建分页语句,传入起始行就行了,一下例子是取第1条到第4条记录。with temp1 as( select ROW_NUMBER() over(order by ccode) 'rowNum',* from tabcompany ) select * from temp1 where rowNum between 1 and 4
with temp1 as( select ROW_NUMBER() over(order by ccode) 'rowNum',* from tabcompany ) select * from temp1 where rowNum between 1 and 4 创建行号~~
select ROW_NUMBER() over(order by ccode) 'rowNum',*
from tabcompany
)
select * from temp1
where rowNum between 1 and 4
select ROW_NUMBER() over(order by ccode) 'rowNum',*
from tabcompany
)
select * from temp1
where rowNum between 1 and 4
创建行号~~