SQL — LIMIT

Syntax

LIMIT (int first, int count)

Description

The LIMIT clause on SELECT statements returns a specified number of rows starting at a selected offset. A READ RECORD on the channel returns !ERROR=2 - End of File when this limit is reached.

Parameters

Parameter Description
first The offset of the first row to return.
count The maximum number of rows to return.

Remarks

  • The first parameter is based in 1.
  • The number of rows must be a positive integer.

See Also

SQL Grammar

BBj Support for SQL-99 and SQL-2003 Features

BBj SQL Engine Grammar Example