MyBatis Paging Query

Paging Query

Example

1
2
3
4
5
6
7
8
9
10
11
12
<select id="getUserArticles" parameterType="Your_params" resultMap="resultUserArticleList">
select
user.id,
user.userName,
user.userAddress,
article.id
aid,
article.title,
article.content
from user,article
where user.id=article.userid and user.id=#{id} limit #{offset},#{pagesize}
</select>