Looking for sql-server Answers? Try Ask4KnowledgeBase
Looking for sql-server Keywords? Try Ask4Keywords

Microsoft SQL ServerLimit Result Set


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.


TOPLimiting keyword. Use with a number.
PERCENTPercentage keyword. Comes after TOP and limiting number.


If ORDER BY clause is used, limiting applies to the ordered result set.