MySQL分页

MySQL大约 751 字

limit start,count 获取部分行

从start开始,获取count条数据 start索引从0开始

select * from user limit 0,5;

+----+------+------+---------------------+--------+------+----------+
| id | name | age  | birthday            | gender | home | isdelete |
+----+------+------+---------------------+--------+------+----------+
|  1 | 刘备     |   37 | 2000-01-01 00:00:00 |       | 蜀     |          |
|  2 | 关羽     |   36 | 2000-01-01 00:00:00 |       | 蜀     |          |
|  3 | 张飞    |   35 | 2000-01-01 00:00:00 |       | 蜀     |          |
|  4 | 曹操    |   40 | 2000-01-01 00:00:00 |       | 魏    |          |
|  5 | 曹丕    |   20 | 2000-01-01 00:00:00 |       | 魏    |          |
+----+------+------+---------------------+--------+------+----------+
5 rows in set (0.00 sec)
阅读 262 · 发布于 2019-04-07

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批