Top



TOP limits the number of rows returned by a query.

Notes on ordering

  • Queries are processed in parallel, so without ORDER BY the rows returned by TOP are not necessarily the first documents in the schema.
  • With ORDER BY, the full result set is ordered before the limit is applied.
  • Use Offset with TOP to page through results.


round-pushpin Returns 10 documents.
SELECT TOP 10 * FROM WordList:Word

round-pushpin Orders the words by text and returns the first 10.
SELECT TOP 10 * FROM WordList:Word ORDER BY Text




SQL :: Distinct
Removes duplicate rows from the results of a SELECT.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Offset
Skips a number of rows of an ordered result, for paging.
SQL :: Order By
Order by sorts a result set by a given set of fields or expressions.
SQL :: Select
Select statements are used to read (or query) data from the database.