In MySQL, which rows does SELECT * FROM t LIMIT 5 OFFSET 10 return (in the given order)?
-
A
Rows 11 to 15
Correct answer
-
B
Rows 5 to 10
-
C
Rows 1 to 5
-
D
Rows 10 to 15
Correct answer
A. Rows 11 to 15
16 views
Explanation
OFFSET 10 skips the first ten rows, and LIMIT 5 then returns the next five, rows 11–15. This is the standard pattern for pagination.
Reference
Asked in: NTS, Technical Interviews
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ