In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will introduce in detail for you "mysql how to achieve paging", the content steps are clear and detailed, the details are handled properly, and the editor will update different knowledge points every day, I hope this article "how to achieve paging in mysql" can give you unexpected gains, please follow the editor's ideas slowly in depth, the specific content is as follows, to harvest new knowledge.
Methods: 1, using limit to achieve paging, the syntax is "SELECT*FROM table name limit starting records, the number of entries per page"; 2, using the primary key index to achieve paging, the syntax is "SELECT*FROM table name WHERE field name > (number of pages * 10) LIMIT number".
The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.
How to realize paging in mysql
First write a table query statement, and then add limit to the statement to achieve the effect of paging.
Click run to get the 10 records on the first page, as shown in the figure. Such paging is generally used to achieve paging for tables with less data.
Method 2
Right-click the table, open the right-click menu list, click the design table, enter the design table window, click the index, enter the index window to complete the setting of the primary key index
Then use SELECT * FROM test WHERE id > (1 to 10) LIMIT 30 to achieve paging. 1 is the number of pages and 30 is the number of entries. This is faster for tables with a large amount of data, as shown in the figure
Thank you for reading here. The editor hopes that you have the most profound experience on the key issue of "how to achieve paging in mysql" from the practical level, and you still need to practice and use it yourself to understand it. If you want to read more related articles, welcome to follow the industry information channel!
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: 213
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.