Skip to content
Justice Tech School

LIMIT and OFFSET

LIMIT caps the rows returned and OFFSET skips rows first. Combine with ORDER BY to get a stable top list.

Example
SELECT name, score FROM students
WHERE score IS NOT NULL
ORDER BY score DESC
LIMIT 3 OFFSET 1;

Result

name   | score
Zainab | 88
Amina  | 85
Kofi   | 78

Exercise

Skip 2 rows.

LIMIT 3  2

Quiz Test

What does OFFSET 1 do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.