Home >Database >Mysql Tutorial >How Can I Skip the First 10 Results in a MySQL Query?

How Can I Skip the First 10 Results in a MySQL Query?

Barbara Streisand
Barbara StreisandOriginal
2024-12-11 11:24:13352browse

How Can I Skip the First 10 Results in a MySQL Query?

Omitting the First 10 Results in MySQL Queries

In MySQL, you can selectively eliminate the first 10 results from a SELECT query using the LIMIT clause with two parameters. This syntax enables you to skip a specified number of entries before returning the desired results.

To illustrate, if you want to retrieve results from the 11th row onwards (i.e., excluding the first 10 rows), you can use the following query:

SELECT * FROM foo LIMIT 10, 50

This query will return rows 11 to 60.

For a solution that excludes all results, refer to Thomas' answer.

The above is the detailed content of How Can I Skip the First 10 Results in a MySQL Query?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn