Home > Database > Mysql Tutorial > mysql查询语句通过limit来限制查询的行数_MySQL

mysql查询语句通过limit来限制查询的行数_MySQL

PHP中文网
Release: 2016-05-27 14:12:04
Original
1490 people have browsed it

mysql查询语句通过limit来限制查询的行数_MySQL

mysql查询语句,通过limit来限制查询的行数。

例如:

SELECT name from usertb where age > 20 limit 0, 1; //限制从第一条开始,显示1条 
SELECT name from usertb where age > 20 limit 1; //同上面的一个效果 
SELECT name from usertb where age > 20 limit 4, 1; //显示从第五条开始,显示1条
Copy after login

   

以上就是mysql查询语句通过limit来限制查询的行数_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template