mybatis 注解分页查询
时间: 2023-10-17 12:58:54 浏览: 131
mybatis分页查询
4星 · 用户满意度95%
Mybatis注解分页查询是使用注解的方式来实现数据库查询结果的分页显示。通过在SQL语句中使用limit关键字和计算公式,可以指定要显示的页数和每页的记录数。常用的注解有@Select、@Insert、@Update和@Delete等。分页查询的公式为:limit (currentPage-1) * pageSize, pageSize,其中currentPage表示当前页数,pageSize表示每页的记录数。基于注解的简单分页查询可以使用这个公式来实现。然而,如果需要展示总页数、总数据条数以及从哪行到哪行的数据等更多的功能需求,就需要进行更复杂的分页查询。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [MyBatis = MyBatis注解讲解和分页查询](https://blog.csdn.net/u010581811/article/details/106108799)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Mybatis实现分页查询](https://blog.csdn.net/weixin_45939128/article/details/127898701)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [MyBatis实现分页查询](https://blog.csdn.net/m0_51660523/article/details/118727376)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文