Stats

334 Contributors: 11 Monday, May 22, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Limit and Offset

Syntax

  • SELECT column_1 [, column_2 ]
    FROM table_1
    ORDER BY order_column
    LIMIT row_count [OFFSET row_offset]
  • SELECT column_1 [, column_2 ]
    FROM table_1
    ORDER BY order_column
    LIMIT [row_offset,] row_count

Remarks

"Limit" could mean "Max number of rows in a table".

"Offset" mean pick from row number (not to be confused by primary key value or any field data value)

Related Examples