MySQL_数据分页查询(limit用法)

原文地址:MySQL_数据分页查询(limit用法)

https://blog.csdn.net/ls_man/article/details/11783813

取前5条数据

select * from table_name limit 0,5

select * from table_name limit 5

取第11条到第15条数据,共5条

select * from table_name limit 10,5

limit关键字的用法:

LIMIT [offset,] rows

offset指定要返回的第一行的偏移量,rows第二个指定返回行的最大数目。初始行的偏移量是0(不是1)。

技术博客,请尊重博主劳动成果,转载请注明出处,谢谢合作。
 

猜你喜欢

转载自blog.csdn.net/Angel_guoo/article/details/83239835