MySQL 分页

MySQL About 751 words

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)
Views: 1,990 · Posted: 2019-04-07

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

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

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


Today On History
Browsing Refresh