一,分页的sql语句
select * from account limit startIndex,pageSize
startIndex
:从哪一条数据开始,第一条数据下标为0pageSize
:查询数据的偏移量(从startIndex开始查询多少条数据)
二,mybatis实现分页查询
2.1数据库字段
2.2实体类
package cn.mybatis.pojo;
public class Account {
private int id;
private String username;
private String password;
private double money;
private int state;
private int num;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPas