Oracle分页:工作记录
Oracle分页:传入值为List<String> 。 Mybatis XXXMapper.xml
1 SELECT 2 * 3 FROM 4 ( 5 SELECT 6 ROWNUM rn, 7 t1.cardnumber, 8 t1.merchantnumber, 9 t1.transactiondate, 10 t1.transactiontime, 11 t1.transactionmoney 12 FROM 13 ( 14 select 15 t.cardnumber, 16 t.merchantnumber, 17 t.transactiondate, 18 t.transactiontime, 19 t.transactionmoney 20 from 21 t_transaction_records_his t 22 where 23 t.cardnumber in 24 <foreach collection="cardlist" item="item" index="index" open="(" close=")" separator=","> 25 #{item} 26 </foreach> 27 ) t1 28 WHERE 29 <![CDATA[ ROWNUM <= ${endResult} ]]> 30 ) t2 31 WHERE 32 T2.rn >= ${startResult}