alter table tbl_board add (replycnt NUMBER(10,0) default 0);
P503
resources/mappers/boardMapper.xml의 일부
<select id="listCri" resultType="org.zerock.domain.BoardVO">
<![CDATA[
select
bno, title, content, writer, viewcnt, regdate, replycnt
from
(
select
/*+INDEX_DESC(tbl_board, pk_board)*/
rownum rn, bno, title, content, writer, viewcnt, regdate
from tbl_board
where rownum <= #{page} * #{perPageNum}
and bno > 0
)
where rn > (#{page} -1) * #{perPageNum}
]]>
</select>
댓글 없음:
댓글 쓰기