AI engineering glossary · SQL databases
What is LIMIT (LIMIT and OFFSET)?
LIMIT and OFFSET (also called LIMIT, OFFSET, TOP): LIMIT caps how many rows a query returns; OFFSET skips a number of rows first. Together they page through results. Large offsets are slow because skipped rows are still read. SQL Server writes this as TOP or OFFSET FETCH.
LIMIT and OFFSET: an example
ORDER BY id LIMIT 10 OFFSET 20 returns rows 21 to 30, the third page of ten.
Related terms
More SQL databases terms
- Locking
- Many-to-many relationship
- Materialized view
- Migration
- MVCC
- N+1 query problem
- Non-repeatable read
- Normalization
Where you learn it
LIMIT and OFFSET is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.