Previous Topic

Next Topic

SQL FIRST Clause

The FIRST clause causes the query to only return the first N number of rows, respecting any GROUP BY, HAVING, or ORDER BY clauses. The syntax is as follows:

  SELECT FIRST number_of_rows

The rows that are selected start at the logical first record of the result set and proceed to the total number of rows matching the FIRST clause. Use of the clause is optional.

See Also

SQL Clauses

Book Contents

Book Index