單的SQL命令分頁的方法大概有以下兩種:
1:使用with pardata指令結合rownum來完成,示例如下:
with partdata as (select rownum rowno,t.* from testtable t) select * from partdata where rowno between 1 and 100
2:使用rownum,結合子查詢的方法,示例如下:
select f01,f02,f03 from (select rownum rowno,f01,f02,f03 from testtable where rownum <=100) where rowno>=1;
備注:以上方法也適合在多表聯合的情況下