Skip to content
Advertisement

SQL get results 21-30?

This seems like a really simple question but I can’t seem to find information on it.

If I have 100 results, and I only want to get the results results between 21 and 30 (from the order my SQL query is grabbing them), how would I accomplish this?

Advertisement

Answer

You can use this:

LIMIT 20, 10

E.g.,

select *
from MyTable
LIMIT 20, 10
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement