码迷,mamicode.com
首页 > 编程语言 > 详细

spring batch中MyBatisPagingItemReader分页使用介绍

时间:2018-08-27 14:11:53      阅读:2248      评论:0      收藏:0      [点我收藏+]

标签:inner   pre   ges   mes   isp   from   code   aging   line   

假如是mysql的话,SQL语句

select * from 
(
SELECT so.* FROM t_tm_sales_order so 
where so.last_modified_time >= to_timestamp(‘2015-05-05‘,‘yyyy-mm-dd hh24:mi:ss‘) 
order by so.id limit #{_pagesize} OFFSET #{_skiprows}  
) temp_a inner join t_tm_sales_order_line sol on temp_a.id=sol.so_id

假如是oracle的话,SQL语句

select t2.* from
(select t1.*,rownum rn from
(select * from a) t1 where rownum<= (#{_pagesize} + #{_skiprows})) t2 where t2.rn > #{_skiprows}

 

spring batch中MyBatisPagingItemReader分页使用介绍

标签:inner   pre   ges   mes   isp   from   code   aging   line   

原文地址:https://www.cnblogs.com/nizuimeiabc1/p/9541447.html

(2)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!