Limit SQL query result in MySQL

前端 未结 7 1667
無奈伤痛
無奈伤痛 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

    0 讨论(0)
提交回复
热议问题