Question · SQL and MySQL course · Module 2: Querying data (SELECT)

OFFSET formula for pagination

With 5 entries per page, what OFFSET must you give to show the third page of results?

Answer options

  • OFFSET 15 - because 3 * 5 = 15
  • OFFSET 10 - because (3 - 1) * 5 = 10
  • OFFSET 3 - that is, the page number
  • OFFSET 5 - always the page size
Show the answer

Correct answer:

  • OFFSET 10 - because (3 - 1) * 5 = 10