Limit SQL query result in MySQL

前端 未结 7 1646
無奈伤痛
無奈伤痛 2021-02-08 16:10

I would like to limit the amount of rows I fetch in MySQL. Can you show me how?

ex:

  • 1st query I would like to retrieve only the first 10,000 records
  • <
7条回答
  •  野的像风
    2021-02-08 17:01

    I think the following queries will give you the desired result

    SELECT * FROM PERSON_TBL LIMIT 0, 10000

    @ 1st query I would like to retrieve only the first 10,000 records

    SELECT * FROM PERSON_TBL LIMIT 10000,10000

    @ 2nd query I would like to retrieve only records from 10,000 - 20,000

提交回复
热议问题