As database tables grow, it's often useful to limit the results of queries to a fixed number or percentage. This can be achieved using SQL Server's TOP
keyword or OFFSET FETCH
clause.
Parameter | Details |
---|---|
TOP | Limiting keyword. Use with a number. |
PERCENT | Percentage keyword. Comes after TOP and limiting number. |
If ORDER BY
clause is used, limiting applies to the ordered result set.