MySQL Limit and Offset

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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)



Got any MySQL Question?