2016년 1월 6일 수요일

오라클버전 P418에 필요한 댓글의 페이징 처리 쿼리


<select id="listPage" resultType="ReplyVO">
<![CDATA[
 select
   rno, bno, replytext, replyer, regdate, updatedate
 from
   (
   select /*+INDEX_DESC(tbl_reply pk_reply))*/
     rownum rn, rno, bno, replytext, replyer, regdate, updatedate
   from tbl_reply
   where bno = #{bno}
   and rno > 0
   and rownum <= #{cri.page} * #{cri.perPageNum}
   )
where rn > ( #{cri.page} -1) * #{cri.perPageNum}
]]>
</select>

댓글 없음:

댓글 쓰기