New versions: Dev (3.14)

ROWNUM to LIMIT

Applies to ❌ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Old Oracle SQL statements may use ROWNUM filtering to paginate, as Oracle has introduced support for FETCH FIRST only in Oracle 12c.

This transformation allows for transforming some of these syntaxes to equivalent, standard syntax using window functions or FETCH FIRST:

-- Input
SELECT * FROM t WHERE rownum = 1
-- Output
SELECT * FROM t LIMIT 1

Example configuration

Settings settings = new Settings()
    .withTransformRownum(true);
The jOOQ Logo