LIMIT Clause
The LIMIT clause specifies the maximum number of
rows to return. If no LIMIT clause is specified, then SQL
returns all rows.
LIMIT follows the syntax LIMIT {count}.
Here’s an example.
SELECT City
FROM "Superstore"
ORDER BY City
LIMIT 5;
This query returns the cities in the first three rows of the dataset.
City |
---|
Aberdeen |
Abilene |
Akron |
Akron |
Akron |