clause

LIMIT

Caps the number of returned rows. This syntax is a dialect feature, not the standard FETCH syntax. Example target: PostgreSQL 17 and SQLite (local fixture tested).

Formal Syntax & Structure

sql syntaxsql
LIMIT count

Working Example

Example Snippetsql
SELECT id FROM orders ORDER BY id LIMIT 2;
SQL Reference