limit是mysql的语法select * from table limit m,n

其中m是指记录开始的index,从0开始,表示第一条是指从第m+1条开始,取n条。

 

 select * from tablename limit 2,4即取出第3条至第6条,4条记录

mysql求前几条数据之和:

select sum(stats_unique_unique)
from
(SELECT stats_unique_unique from t_stats where fk_site = 9 limit 0, 7) a; 
select * from table limit 5; --返回前5行

select * from table limit 0,5; --同上,返回前5行

select * from table limit 5,10; --返回6-15行

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-11-28
  • 2021-08-06
猜你喜欢
  • 2021-09-15
  • 2021-11-19
  • 2021-12-09
  • 2021-10-23
  • 2021-07-06
  • 2022-12-23
相关资源
相似解决方案