mybatis的oracle分页查询demo
程序员文章站
2022-07-09 20:34:02
...
<!-- mybatis oracle分页查询 -->
<select id="getAllMsgByMlh" resultType="java.util.HashMap">
SELECT *
FROM (SELECT A.*, ROWNUM RU
FROM (SELECT ASJBH,
PAGENUM
FROM jz_dzjz_list
WHERE JZMLH = '${jzmlh}'
ORDER BY START_PAGE) A
where ROWNUM <![CDATA[ < ]]> '${end}')
WHERE RU >= '${start}'
</select>
<select id="getAllMsgByMlh" resultType="java.util.HashMap">
SELECT *
FROM (SELECT A.*, ROWNUM RU
FROM (SELECT ASJBH,
PAGENUM
FROM jz_dzjz_list
WHERE JZMLH = '${jzmlh}'
ORDER BY START_PAGE) A
where ROWNUM <![CDATA[ < ]]> '${end}')
WHERE RU >= '${start}'
</select>