Cross-Dialect Pagination Builder
Enter a query, page size and page number, and get the correct pagination syntax for five SQL dialects.
About this tool
MySQL, PostgreSQL and SQLite all share the same LIMIT {size} OFFSET {offset} syntax. SQL Server and modern Oracle (12c and later) instead use the standard SQL OFFSET {offset} ROWS FETCH NEXT {size} ROWS ONLY syntax — and critically, both require an ORDER BY clause for this to work, since "page 2" is only meaningful relative to a defined sort order. Older Oracle versions (pre-12c) had no OFFSET/FETCH support and used a ROWNUM-based wrapper query pattern instead (wrapping the query twice to filter on ROWNUM between the offset and offset+size); this tool generates the modern syntax only. The offset is calculated as (page number − 1) × page size.
If you leave ORDER BY blank, SQL Server gets the placeholder ORDER BY (SELECT NULL) and Oracle gets ORDER BY NULL, which satisfy the syntax but don't give a stable order, so add a real column, ideally a unique one such as id. On very large tables a high OFFSET gets slow, because the database still reads every skipped row; "keyset" pagination (WHERE id > {last id seen} ORDER BY id LIMIT {size}) stays fast however deep you go.