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.

Level: beginnerTopic: SQL databases

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.