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条

 

select name from usertb order by age desc limit 4; 倒序排列年龄,支线前4行

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-02-09
  • 2021-06-04
  • 2021-06-06
  • 2022-02-09
  • 2022-02-24
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-08-05
  • 2021-08-05
  • 2021-07-12
  • 2022-12-23
相关资源
相似解决方案