LIMIT in SELECT for Firebird

The Firebird equivalent for mySQL/PostgreSQL LIMIT statement is:

SELECT FIRST X [SKIP Y] * FROM …. (your query)

Simple, the X is the number of results you want and the Y is how many results you want to “jump”.
The SKIP is optional.
Example:

SELECT FIRST 20 SKIP 40 columnA, columnB FROM TABLENAME …

that’s it.

Leave a Reply