게시판의 페이징 처리를 위한 sql 작성하기
Oracle
1
2
3
4
5
6
7
SELECT * FROM
(
SELECT ROWNUM rn, ORDER_ID, CUSTOMER_ID, STATUS, SALESMAN_ID, ORDER_DATE
FROM ORDERS
WHERE ROWNUM <= :pageNum * :rowSize
)
WHERE RN > :pageNum * :rowSize - :rowSize;
This post is licensed under CC BY 4.0 by the author.