加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

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

发布时间:2020-12-12 08:12:55 所属栏目:MsSql教程 来源:网络整理
导读: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; /
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条

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读