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


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条
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3