首页 > 编程语言 > 详细

orcal分页查询带条件排序

时间:2020-01-07 13:13:13      阅读:67      评论:0      收藏:0      [点我收藏+]
<select id="queryInjuredCase" resultMap="BaseResultMap">
SELECT aa.* FROM (SELECT a.*,rownum rn FROM
(SELECT *
FROM INJURED_CASE
where 1 = 1 AND status = 1
<if test="qicp != null">
<if test="qicp.vinNum != null and qicp.vinNum != ‘‘">
and VIN like ‘%${qicp.vinNum}%‘
</if>
<if test="qicp.plateNum != null and qicp.plateNum != ‘‘">
and PLATE_NUM like ‘%${qicp.plateNum}%‘
</if>
</if>
order by create_date desc)a)aa
WHERE aa.rn &lt;= #{endRow} and aa.rn > #{startRow}
</select>

orcal分页查询带条件排序

原文:https://www.cnblogs.com/lazyli/p/12160733.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!