Microsoft SQL ServerLimit Result Set


Introduction

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.

Parameters

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

Remarks

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