Limit SQL query result in MySQL

前端 未结 7 1648
無奈伤痛
無奈伤痛 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 16:49

    select top x * from table in SQL Server
    
    select * from table where ROWNUM < x in Oracle
    
    select * from table limit x in MySQL
    

提交回复
热议问题