分页查询

    <select id="getReportsByPage" parameterType="com.supermap.supervise.entity.Report" resultType="com.supermap.supervise.entity.Report">
    select * from (select rownum r,t.* from (select * from JB_REPORT
    <where>
    <if test="rpname!='' and rpname!=null">
    and  rpname like '%'||upper(#{rpname})||'%'
    </if>
    </where>
    order by rpid)
    t where rownum &lt;= #{page}*#{pageSize}) where r>(#{page}-1)*#{pageSize}
    </select>

 

上一篇:oracle部分:分页查询


下一篇:Oracle-子查询,分页