A newer version of this documentation is available.

View Latest

LIMIT clause

LIMIT expression

The LIMIT clause specifies the maximum number of objects that can be returned in a result set by SELECT. A negative value or a value greater than 9223372036854775295 (result of math.MaxInt64`- 512`) is considered as LIMIT 0.

Name and age list: limit by 2

SELECT fname, age
     FROM tutorial
          ORDER BY age
              LIMIT 2


   "results": [
       "age": 18,
       "fname": "Fred"
       "age": 20,
       "fname": "Harry"