Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the purpose of mysql paging query

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Below I will give you a brief talk about mysql pagination query what is the role, you know before the related similar topic content? Interested in the words together to see this article, I believe that after reading mysql paging query what role to everyone how much help bar.

Pagination query: one page is incomplete, sql request needs to be submitted by pagination

select query list from Name: join Table 2on Connection Conditions Where filter criteria group by grouping field having condition order by limit index, number of entries; index here starts from 0 or limit number of entries;

Features: Number of pages and relationship of articles

select query list from table limit (page-1)*size,size; Assume size=5 page start index 1 0 2 5 3 10 So index position: (page-1)*5;

#Case: Query the first five employee information

SELECT *FROM employeesLIMIT 0,5;SELECT * FROM employees LIMIT 5;

#Case: Query employee information in Articles 11 to 25

SELECT *FROM employeesLIMIT 10,15;

#Case: Information on employees with bonuses and top ten with higher salaries

SELECT *FROM employeesWHERE commission_pct IS NOT NULLORDER BY salary DESC

LIMIT 10;

What do you think mysql pagination query has to do with this article, whether there is harvest. If you want to know more about it, you can continue to pay attention to our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report