How to retrieve records by a specific row number in MySQL?

In MySQL, the LIMIT clause can be used to retrieve a specified number of records. For example, to retrieve records from the 10th row to the 20th row, you can use the following query statement:

SELECT * FROM table_name LIMIT 9, 10;

The LIMIT clause here has two parameters, where the first one indicates the number of rows to skip (starting at row 0), and the second one indicates the number of rows to return. Therefore, the query above will return records from the 10th row to the 20th row.

Leave a Reply 0

Your email address will not be published. Required fields are marked *