Quick Answer
LIMIT restricts how many rows are returned: SELECT * FROM users LIMIT 10. LIMIT with OFFSET for pagination: LIMIT 10 OFFSET 20 skips 20 rows and returns the next 10. Or shorthand: LIMIT 20, 10 (offset first, then count). Large OFFSET values are slow (MySQL scans and discards rows). For efficient deep pagination, use keyset/cursor-based pagination instead.
Answer
LIMIT restricts the number of rows returned by a query, commonly used for pagination.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.