The LIMIT qualifier enables you to choose how many rows to return in a query, and where in the table to start returning them. When passed a single parameter, it tells MySQL to start at the beginning of the results and just return the number of rows given in that parameter. If you pass it two parameters, the first indicates the offset from the start of the results where MySQL should start the display, and the second indicates how many to return. You can think of the first parameter as saying, “Skip this number of results at the start.”
Next example includes three commands. The first returns the first three rows from the table. The second returns two rows starting at position 1 (skipping the first row). The last command returns a single row starting at position 3 (skipping the first three rows)
Limiting the number of results returned:
SELECT author,title FROM classics LIMIT 3;
SELECT author,title FROM classics LIMIT 1,2;
SELECT author,title FROM classics LIMIT 3,1;
Be careful with the LIMIT keyword, because offsets start at 0, but
the number of rows to return starts at 1. So, LIMIT 1,3 means
return three rows starting from the second row. You could look at
the first argument as stating how many rows to skip, so that in
English the instruction would be “Return 3 rows, skipping the first
1.”