Output modifiers can be used to order records in the query result and to define the items to return.
ORDER BY
The
ORDER BY
clause is used to order records in a collection. By
default the order is ascending, but you can specify ASC
or
DESC
. The keyword should be followed by a simple or conditional
expression:ORDER BY expression DESC
LIMIT
The
LIMIT
clause allows you to define a maximum number of elements to
return in the query result. The keyword should be followed by an integer or by a simple
or conditional expression that returns an
integer.LIMIT expression
OFFSET
The
OFFSET
clause allows you to discard a number of elements at the
beginning of the query result. The keyword should be followed by an integer or by a
simple or conditional expression that returns an
integerOFFSET expression