Characteristics of FIRST and SKIP
-
Any argument to
FIRSTandSKIPthat is not an integer literal or an SQL parameter must be enclosed in parentheses.This implies that a subquery expression must be enclosed in two pairs of parentheses. -
SKIP 0is allowed but pointless. -
FIRST 0is also allowed and returns an empty set. -
Negative
SKIPand/orFIRSTvalues result in an error. -
If a
SKIPlands past the end of the result set, an empty set is returned. -
If the number of rows in the result set (or the remainder left after a
SKIP) is less than the value of the m argument supplied forFIRST, that smaller number of rows is returned.These are valid results, not error conditions.