SQL Server TOP Clause
Quick Answer
The TOP clause in SQL Server limits the number of rows returned by a query. It is useful for retrieving a subset of data, such as the first N rows or a percentage of rows, improving query performance and focusing on relevant results.
Learning Objectives
- Understand the purpose and use cases of the TOP clause in SQL Server.
- Learn the syntax variations of the TOP clause including limiting by number and percentage.
- Apply the TOP clause in practical SQL queries with ordering and filtering.
Introduction
When working with large datasets in SQL Server, you often need to retrieve only a portion of the data.
The TOP clause helps you limit the number of rows returned by a query, making data handling more efficient and focused.
Limit your results to what matters most.





