美文网首页
MySQL LIMIT 分页查询

MySQL LIMIT 分页查询

作者: GaoEnron | 来源:发表于2019-03-11 22:28 被阅读0次

    查询从第六行开始,每次查三条数据

    SELECT * FROM employee LIMIT 6 , 3;   LIMIT(a, b)a: 代表从第几行开始 ,b: 代表每次查询几个数据
    +-------+--------+----------+------+------------+---------+------+--------+
    | empno | ename  | job      | mgr  | hiredata   | sal     | comm | deptno |
    +-------+--------+----------+------+------------+---------+------+--------+
    |  7782 | CLARK  | MANAGER  | 7839 | 1981-06-09 | 2450.00 | NULL |     10 |
    |  7788 | SCOTT  | ANALYST  | 7566 | 1987-04-19 | 3000.00 | NULL |     20 |
    |  7844 | TURNER | SALESMAN | 7698 | 1981-09-08 | 1500.00 | 0.00 |     30 |
    +-------+--------+----------+------+------------+---------+------+--------+
    

    相关文章

      网友评论

          本文标题:MySQL LIMIT 分页查询

          本文链接:https://www.haomeiwen.com/subject/evoipqtx.html