오라클 | CUBRID |
SELECT AA.* FROM ( SELECT D.* FROM ( SELECT col1, col2, col3, col4, col5, ROWNUM AS RNUM FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc ) D WHERE D.RNUM <= ?1 ) AA WHERE AA.RNUM >= ?2 | SELECT col1, col2, col3, col4, col5, ORDERBY_NUM() AS RNUM FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc LIMIT ?1,?2 |
파라미터 값
?1 ?2 ( 1페이지 ) | ?1 ?2 ( 2페이지 ) | ?1 ?2 ( 3페이지 ) | |
오라클 | 10, 1 | 20, 11 | 30, 21 |
CUBRID | 0, 10 | 10, 10 | 20, 10 |
오라클 | CUBRID |
SELECT D.* FROM ( SELECT T1.*, ROWNUM AS RNUM FROM ( SELECT col1, col2, col3, col4, col5 FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc ) T1 ) D WHERE RNUM BETWEEN ?1 AND ?2 | SELECT col1, col2, col3, col4, col5, ORDERBY_NUM() AS RNUM FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc LIMIT ?1,?2 |
파라미터 값
?1 ?2 ( 1페이지 ) | ?1 ?2 ( 2페이지 ) | ?1 ?2 ( 3페이지 ) | |
오라클 | 1, 10 | 11, 20 | 21, 30 |
CUBRID | 0, 10 | 10, 10 | 20, 10 |
오라클 | CUBRID |
SELECT D.* FROM ( SELECT T1.*, ROWNUM AS RNUM FROM ( SELECT col1, col2, col3, col4, col5 FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc ) T1 ) D WHERE RNUM > #min# AND RN <= #max# | CUBRID SELECT col1, col2, col3, col4, col5, ORDERBY_NUM() AS RNUM FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc LIMIT ?1,?2 |
파라미터 값
#min# #max# ( 1페이지 ) | #min# #max# ( 2페이지 ) | #min# #max# ( 3페이지 ) | |
오라클 | 0, 10 | 10, 20 | 20, 30 |
CUBRID | 0, 10 | 10, 10 | 20, 10 |
오라클 | CUBRID |
SELECT H.*, CEIL(RNUM / #lineperpage:NUMERIC#) AS pgnum FROM ( SELECT T1.*, ROWNUM-1 AS RNUM FROM ( SELECT col1, col2, col3, col4, col5 FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc ) T1 ) H WHERE pgnum = #pagenum# | SELECT col1, col2, col3, col4, col5, ORDERBY_NUM() AS RNUM FROM table_name WHERE col1 = 'abc' and col2 = 'def' ORDER BY col1 desc LIMIT ?1,?2 |
파라미터 값
#lineperpage #pagenum# ( 1페이지 ) | #lineperpage #pagenum# ( 2페이지 ) | #lineperpage #pagenum# ( 3페이지 ) | |
오라클 | 10, 1 | 10, 2 | 10, 3 |
CUBRID | 0, 10 | 10, 10 | 20, 10 |