Usage Scenario of Pagination Query
When there is too much information in the database to be displayed on one page, it needs to be displayed page by page, which is called paging query.
1. Pagination query syntax
SELECT * FROM 'table name' limit start, count;
explain:
① And limit are keywords for paging query.
② Start indicates the beginning of the index line. The default value is 0.
③ And Count indicate the number of queries.
2. Example: Query the information of the first three lines of male students
SELECT * FROM `ceshi1` WHERE `gender` = ‘男’ LIMIT 0,3;
简写:SELECT * FROM `ceshi1` WHERE `gender` = ‘男’ LIMIT 3;