limit-and-paginate-results
Limiting Results
SQLite, PostgreSQL and MySQL
To limit the number of results returned, use the LIMIT
keyword.
MS SQL
To limit the number of results returned, use the TOP
keyword.
Oracle
To limit the number of results returned, use the ROWNUM
keyword in a WHERE
clause.
Paging Through Results
SQLite, PostgreSQL and MySQL
To page through results you can either use the OFFSET
keyword in conjunction with the LIMIT
keyword or just with LIMIT alone.
MS SQL and Oracle
To page through results you can either use the OFFSET
keyword in conjunction with the FETCH
keyword. Cannot be used with TOP
.
Last updated
Was this helpful?