SQL study note
useful sql query for future reference.
Oracle Pagination
Pagination with ROWNUM.
select * from (
select a.*, ROWNUM rnum from (
<select statement with order by>
) a where rnum < Max_row
) where rnum >=Min_row
PostgreSQL Pagination
Pagination with offset and limit.
select statement with order by
limit Num_OF_Row offset start_Row