FIRST
, SKIP
Retrieves a slice of rows from an ordered set
SELECT [FIRST <limit-expression>] [SKIP <limit-expression>] FROM ... ... <limit-expression> ::= <integer-literal> | <query-parameter> | (<value-expression>)
Argument | Description |
---|---|
integer-literal |
Integer literal |
query-parameter |
Query parameter place-holder. |
value-expression |
A valid expression (returning an integer value) |
Note
|
FIRST and SKIP are non-standard syntax
|
FIRST m
limits the output of a query to the first m rows.SKIP n
will skip the first n rows of the result set before returning rows.
FIRST
and SKIP
are both optional.When used together as in “FIRST m SKIP n
”, the n topmost rows of the result set are discarded, and the first m rows of the rest of the set are returned.