Jump to content


[MySQL] How to limit the number of rows returned in MySQL?

  • This topic is locked This topic is locked
No replies to this topic

#1 Cryo Kinesis

Cryo Kinesis

    Haphost Staff

  • Moderators
  • 128 posts
  • LocationGridania, Eorzea

Posted 05 August 2014 - 04:36 PM

Hi there,


MySQL supports the LIMIT keyword, which allows you to control how many rows are returned; ideal when displaying data over many pages. You can use LIMIT in your sql query like this:

SELECT name FROM table LIMIT 10

If you want to get the rows between 10 and 20 do the following:

SELECT name FROM table LIMIT 9, 10


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users