Limiting Results with LIMIT
LIMIT restricts how many rows are returned.
Get the top 5 highest paid:
This is essential for:
- Top N queries
- Pagination
- Testing queries on large tables
Always put LIMIT at the end of your query.
Check your understanding
Find the 3 highest-paid employees.
Examples run on the employees sample database. Open any of them in the playground to experiment.