1. 程式人生 > >oracle排序分頁查詢與不排序

oracle排序分頁查詢與不排序

oracle分頁有通用寫法,假設一頁5行select * from ( select t.,rownum from ( select from table1 where condition order by column) t ) where rownum>(pangeNow-1)*5 and rownum<=(pageNow)*5

如果基礎查詢不需要排序,可以省掉一層巢狀select * from ( select t.*,rownum from table1 t where condition ) where rownum>(pangeNow-1)*5 and rownum<=(pageNow)*5

mysql分頁查詢關鍵字 limit