Problem Statement
Which construct is commonly used to paginate results in SQL engines like Postgres and MySQL?
Explanation
LIMIT n OFFSET m returns a window of rows. It is simple and widely supported.
For large pages, prefer keyset pagination using a stable sort key to avoid deep offsets and performance drops.
Code Solution
SolutionRead Only
SELECT id, name FROM products ORDER BY id LIMIT 20 OFFSET 40;
