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
Release: 2024-12-11 11:24:13
Original
380 people have browsed it

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
Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template