Hitachi

Hitachi Advanced Database SQL Reference


1.4 Specifying the maximum number of rows of retrieval results (LIMIT clause)

Use the LIMIT clause to specify the maximum number of rows in the retrieval results. The specification format of the LIMIT clause is as follows.

Specification format
SELECT "column-name" FROM "table-name"
    WHERE search-condition
    LIMIT row-count
LIMIT row-count:

Specify the maximum number of rows allowed in the retrieval results in row-count.

Note

In addition to the maximum number of rows to be returned (row-count), you can also specify in the LIMIT clause the offset of the first row to be returned (offset). The offset option will be omitted in these examples. For details about the syntax of the LIMIT clause, see 7.9.1 Specification format and rules for LIMIT clauses.

Organization of this section