Sunday, 20 September 2015

Paging with oracle


Paging with Oracle


SELECT * FROM
(
    SELECT ID, rownum r__
    FROM
    (
        SELECT ID FROM SUBSCRIBER order by id) a
    WHERE rownum < ((:page * :pageSize) + 1 )
)
WHERE r__ >= (((:page-1) * :pageSize) + 1)